×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    9

    Using the C++ Compiler Always in Carbide .vs

    Hallo,
    I'm using Carbide vs, VS2003, SDK S603rd.
    I want to compile all my sources with the C++ compiler, regardless what extension my files have.
    I found in Carbide .vs install directory, /doc, C_Compilers_Reference_3.2.pdf , and it said in Capital "Using the C++ Compilers Always"(page 55) that we can force C++ compilation by enabling an option
    "Force C++ Compilation" setting in the C/C++ Language Panel.
    I cannot find this option :-( and what I understand with C/C++ Language Panel is in a Project >> right mouseclick Properties >> the section C/C++, am I right?
    The ideas in http://discussion.forum.nokia.com/fo...highlight=lang cannot be used.
    1. to change all the extension in .cpp will take a looong time, since I have about 800 files, which most ended with .h and .c.
    2. to add the line "#pragma cplusplus on" manually in every files, where c++ compiler particulary needed is very complicated.

    So basically there should be 2 ways to solve the problem:
    1. Find the option "Using C++ Compiler always", but where exactly?
    2. Add the line "#pragma cplusplus on" automatically in every files, how can it be done exactly?
    Any helps would be very appreciated.

    Best Regards,
    anton
    Best Regards,
    Anton Herman

  2. #2
    Regular Contributor
    Join Date
    May 2006
    Posts
    95

    Re: Using the C++ Compiler Always in Carbide .vs

    as long as i knw tat's working for cpp extension.

  3. #3
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Using the C++ Compiler Always in Carbide .vs

    The document you mention talks about the c++ compiler in the context of the CodeWarrior IDE. The references to settings panels are references to CodeWarrior, if you want to modify the compiler when used by other IDEs search for their settings documentation or see if you can add commands directly to the compiler's command line in the underlying makefiles.

    As for renaming the .c to .cpp nobody asks you to do it by hand. A batch script can do it, or some freeware tool from the net. The same is valid for a pragma insertion ...

  4. #4
    Registered User
    Join Date
    Oct 2006
    Posts
    9

    Re: Using the C++ Compiler Always in Carbide .vs

    Firstly thanks for the replies.
    I expected that the C++ compiler document should be for Visual Studio 2003 IDE, since Carbide .vs only support VS2003, and the document is inside the install directory from Carbide .vs

    Anyway where I can find the document about compiler setting for VS2003(for Carbide .vs)?
    Where is exactly "the underlying makefiles"?
    Anyone familiar with Carbide .vs compiler setting?

    Because of many problems, I am looking forward to know, how to build my project manually? Can I use command line and build the project step-by-step, so I have the chance of knowing what happen? instead of pushing the button "Build Project" and doesn't know what happen at all behind it.

    All I have now is a picture inside Carbide.vs 2.0.1 Help about Building a release for a Symbian 9 project, which leads me to nowhere :-(

    And my goal from the very first time is to force compiling my sources with C++ Compiler, regardless of file extensions.

    Helps and advices would be very appreciated.
    Best Regards,
    Anton Herman

  5. #5
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: Using the C++ Compiler Always in Carbide .vs

    Quote Originally Posted by ahe
    Anyway where I can find the document about compiler setting for VS2003(for Carbide .vs)?
    As Carbide.vs uses the VS VC++ project type, the basic properties that control compilation and their actions are documented in the Visual Studio documentation, Carbide.vs documentation does not repeat that information. This "direct route" applies to emulator builds. For WINSCW targets however not all properties are passed, only those that are listed as controlling also the .mmp file (see below) can be used.

    Target (GCCE, ARMI, THUMB) builds are controlled by the .mmp file and the section on the .mmp file lists what properties are propagated automatically into the .mmp file and then onwards to the target build. For target builds, the SDK build machinery uses a gcc compiler, the documentation for which is not included with Carbide.vs.

    Quote Originally Posted by ahe
    Where is exactly "the underlying makefiles"?
    As discussed above, the target build is built by a huge amount of Perl scripts and makefiles, none of which are user editable. The way this process is controlled is via the .mmp file and can find all the documentation on that in the SDK documentation (which you can also install into Visual Studio if you like)

    Quote Originally Posted by ahe
    Anyone familiar with Carbide .vs compiler setting?
    As I indicated in a separate thread, beyond what has been discussed here there is no supported mechanism for additional compiler control available in Carbide.vs. Can you be more specific?

    Quote Originally Posted by ahe
    Because of many problems, I am looking forward to know, how to build my project manually? Can I use command line and build the project step-by-step, so I have the chance of knowing what happen? instead of pushing the button "Build Project" and doesn't know what happen at all behind it.
    Sure, Carbide.vs maintains the project structure so that it is compatible with the Symbian command line tools, see again the SDK documentation for details.

    Quote Originally Posted by ahe
    And my goal from the very first time is to force compiling my sources with C++ Compiler, regardless of file extensions.
    Based on suggestions including your own, the PRAGMA approach seems to be the best.

  6. #6
    Registered User
    Join Date
    Oct 2006
    Posts
    9

    Re: Using the C++ Compiler Always in Carbide .vs

    Hi Mitts,
    thanks for replying me,

    As I indicated in a separate thread, beyond what has been discussed here there is no supported mechanism for additional compiler control available in Carbide.vs. Can you be more specific?
    In my VS2003 project properties,
    Configuration Properties >> C/C++ >> Advanced >> Compile As
    has the value "Compile as C++ Code (/TP)", which I think this value should force Carbide .vs compiler as C++ compiler.
    Is this value mean something or just ignored from Carbide .vs compiler?

    Sure, Carbide.vs maintains the project structure so that it is compatible with the Symbian command line tools, see again the SDK documentation for details.
    The only clue I have now is the "Output" window from VS2003, which shows me what happen when I build a project(compile sources and then link all of them, I think). What do you mean with the SDK documentation? please refer to a specific SDK with the title and where to find it. Since I took a lot of time to find the document. I found also at the last Capital from C++ Compiler document about Command-Line Tools, fineee, but nowhere says about, how to build a project from command line step-by-step, any specific SDK tutorial document about this?

    Based on suggestions including your own, the PRAGMA approach seems to be the best.
    It seems to be the last option, anyway someone know a freeware from internet/batch-script to do this?
    Goal : Add at the top of each Files(with the extension .h,.c and .cpp) in a specific directory(with the under directories of course) a new line "#pragma cplusplus on"
    OS : Windows XP SP2

    Any helps and advices would be appreciated.

    Best Regards,
    anton
    Best Regards,
    Anton Herman

  7. #7
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: Using the C++ Compiler Always in Carbide .vs

    Quote Originally Posted by ahe
    In my VS2003 project properties,
    Configuration Properties >> C/C++ >> Advanced >> Compile As
    has the value "Compile as C++ Code (/TP)", which I think this value should force Carbide .vs compiler as C++ compiler.
    Is this value mean something or just ignored from Carbide .vs compiler?
    That switch will be honoured by WINS builds only (i.e. when building for the emulator using the MS/Visual Studio compiler, this means SDKs 1.2 thru 2nd Edition FP2). Building for any phone target (GCCE, ARMI or THUMB) or for WINSCW emulators (2nd Ed FP3 and later SDKs) using the Nokia compiler, Carbide.vs will ignore that setting. Phone targets can be controlled by adding compiler directives manually to the .mmp file as will be described in the SDK documentation but I am not very familiar with those and cannot give further information.

    Quote Originally Posted by ahe
    What do you mean with the SDK documentation? please refer to a specific SDK with the title and where to find it.
    Every Nokia SDK will install a On-line Help system reachable via the Start->Program menu. Exact location will vary a bit, it will take you about 10 seconds to browse the Program menu and locate your SDKs and their Help. If you want the Help information to be available as a Visual Studio Help Collections you can download the installs for this from: http://www.forum.nokia.com/info/sw.n..._vs_2_0_1.html. Those also have information on all the steps for comman line building. Searching this forum for command line building will also bring up tons of threads on that topic. You might also find http://discussion.forum.nokia.com/fo...ad.php?t=80294 a useful starting point.

  8. #8
    Registered User
    Join Date
    Oct 2006
    Posts
    9

    Re: Using the C++ Compiler Always in Carbide .vs

    Thanks mitts for advices.
    Best Regards,
    Anton Herman

Similar Threads

  1. Carbide Pro, APP Trk, wont set debug point
    By jimgilmour1 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2008-06-26, 06:05
  2. Possible carbide bug: Suspended: Signal 'Exception 5' received. Description: Access V
    By alexbirkett in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2006-12-14, 07:40
  3. Import\Export Project Problem in Carbide
    By mohsin.sohail in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 4
    Last Post: 2006-07-17, 20:20
  4. PowerMgmt capability and Carbide .vs
    By Paul.Todd in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2006-06-06, 12:00
  5. Issues with Carbide vs 2.0 installer!
    By kt10208 in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2006-01-16, 09:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×