Thread: Need Help Compiling A VC++ 6 Project In Dev C++ 4.9.9.2

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    4

    Post Need Help Compiling A VC++ 6 Project In Dev C++ 4.9.9.2

    Hi all,

    I'm having trouble compiling a C++ project,which was originally written using the VC++, in Dev-C++. The problem is identifying the compiler errors that are incurred by the Min-Gw compiler(the default compiler that is shipped with Dev-C++)
    I've currently have converted the project(which is an opensource example of JNI) to the Dev-C++ project standard using the Dev-C++ IDE. But now when I try to compile it gives me 11 compiler errors. The 1st of of them is :
    Code:
    C\...\jni_resource.h `_resource' undeclared (first use this function)
    But the above variable '_resource' has already been declared in the header file : "jni_resource_base.h" and that file has been included in the file : "jni_resource.h".
    I guess this will be clear if you could open the project I've attached here as a zip file(as a Dev-C++ 4.9.9.2 project) and try compiling. I've been trying for weeks but still couldn't get anywhere to solving this issue. Therefore It would be great if anyone of you could help me in this.

    P.S : Please change the extension of the attached PDF file to .zip and unzip please.


    Thanks & Regards,
    Shehan.

  2. #2
    Not stupid, just stupider yaya's Avatar
    Join Date
    May 2007
    Location
    Earthland
    Posts
    204
    Is there a valid reason why you are using Dev C++ when you can nab a free version of VSC++?

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    4
    Yes actually I do. I need to make this jni related code as much platform independent as possible.So as Min-Gw is the at least the a bit equivalent of the GCC for windows,i actually no other choice but to use Dev-C++.

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    platform independence has to do with your code, not the IDE/compiler you write it on.

  5. #5
    Registered User
    Join Date
    Sep 2009
    Posts
    4
    Please if you can't help me with the problem.Don't post any more unnecessary comments. Period.
    It will help save both parties a lot of time. Why I need to compile in Dev-C++ is my business. And if you can help me with the problem then please do. Without trying to hide your ineptitude with sarcastic and wannbe geekish comments. I'll not reply to anymore studpid comments by any of you unless it's related to the solution. thanks !!..

  6. #6
    The larch
    Join Date
    May 2006
    Posts
    3,573
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  7. #7
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    I've never used JNI, but I can tell you the MinGW that comes with Dev-C++ is outdated. Dev-C++ is dead, and hasn't been developed for years. That could be why you received those replies. We mostly suggest Code::Blocks as a replacement (cross-platform) or Visual Studio Express. If your project is originally a VC6 project, it likely contains windows specific code, and probably won't compile cross-platform. You're better off having VS convert it for you. When you're ready you can easily use a different IDE/compiler for cross-platform compatibility. Infact my projects have project files for both Code::Blocks and Visual Studio. You can also use make, cmake, etc. for cross-platform goodness and ditch the integrated IDE/compiler. It really depends on your source code. Use VS imo.

    Oh, and ignore my comment all you want.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  8. #8
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by shen747 View Post
    Please if you can't help me with the problem.Don't post any more unnecessary comments. Period.
    It will help save both parties a lot of time. Why I need to compile in Dev-C++ is my business. And if you can help me with the problem then please do. Without trying to hide your ineptitude with sarcastic and wannbe geekish comments. I'll not reply to anymore studpid comments by any of you unless it's related to the solution. thanks !!..
    Well, i was actually trying to help you until you made that asinine comment. Go 'help' yourself.

  9. #9
    The larch
    Join Date
    May 2006
    Posts
    3,573
    If you chose VC++, then it might well turn out that the code is "correct" again (it seems to be more permissive with templates than the standard allows - may-be one can make it more strict in newer versions?). Using GCC to achieve better standard compliance seems like a right step. DevCpp is indeed rather outdated, and you can set up Code::Blocks with a number of compilers (I think it even comes with MiinGW by default).
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  10. #10
    Ex scientia vera
    Join Date
    Sep 2007
    Posts
    477
    Quote Originally Posted by anon View Post
    If you chose VC++, then it might well turn out that the code is "correct" again (it seems to be more permissive with templates than the standard allows - may-be one can make it more strict in newer versions?). Using GCC to achieve better standard compliance seems like a right step. DevCpp is indeed rather outdated, and you can set up Code::Blocks with a number of compilers (I think it even comes with MiinGW by default).
    You are right. Code::Blocks comes with exactly the same compiler, just a newer version. On top of that, it's the best free IDE for C/C++ programming, hands down, in my opinion.

    There's still nothing that beats Visual Studio and it's insanely useful visual debugger, however. But to each his own.

    I've seen so many people recommending Dev-C++ to people that I'm reaching the point where I want to push for a "shoot-on-sight" for everyone who does so - it's outdated, useless crap. It might not be so outdated that it makes much of a difference right now(Only like 4 years old or so), but it might just become the next generation's "Turbo-C++" annoyance. Especially with C++0x coming up relatively soon and all that.

    [/rant]

    Either way, to each his own.
    "What's up, Doc?"
    "'Up' is a relative concept. It has no intrinsic value."

  11. #11
    Registered User
    Join Date
    Sep 2009
    Posts
    4
    Wow thanks anon for pointing me to Code::Blocks. It solved my issue. Thanks everyone ;-). And also thanks Dae for mentioning Boost in your signature. It allowed me to take my C/C++ to the next level.
    Last edited by shen747; 09-17-2009 at 09:56 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bloodshed Dev Stops Compiling
    By bengreenwood in forum C++ Programming
    Replies: 4
    Last Post: 11-11-2007, 03:25 PM
  2. dev c++ project option
    By rodrigorules in forum C++ Programming
    Replies: 2
    Last Post: 06-07-2006, 08:32 PM
  3. Dev C++ takes 3 mins to reload a project
    By phil in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 09-01-2005, 02:32 PM
  4. DJGPP project problems
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 06-08-2002, 07:16 PM
  5. Compiling assembly code into project
    By knutso in forum C Programming
    Replies: 2
    Last Post: 02-26-2002, 03:24 PM

Tags for this Thread