C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 09-17-2009, 02:16 AM   #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.

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


Thanks & Regards,
Shehan.
Attached Images
File Type: pdf cuj_jni_code(dev-cpp).pdf (27.6 KB, 15 views)
shen747 is offline   Reply With Quote
Old 09-17-2009, 02:26 AM   #2
Not stupid, just stupider
 
yaya's Avatar
 
Join Date: May 2007
Location: Earthland
Posts: 151
Is there a valid reason why you are using Dev C++ when you can nab a free version of VSC++?
yaya is offline   Reply With Quote
Old 09-17-2009, 02:30 AM   #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++.
shen747 is offline   Reply With Quote
Old 09-17-2009, 02:54 AM   #4
Rampaging 35 Stone Welsh
 
abachler's Avatar
 
Join Date: Apr 2007
Posts: 2,926
platform independence has to do with your code, not the IDE/compiler you write it on.
__________________
He is free, you say. Ah! That is his misfortune… These men… [have] the most terrible, the most imperious of masters, that is, need. … They must therefore find someone to hire them, or die of hunger. Is that to be free? - Simon Linguet
abachler is online now   Reply With Quote
Old 09-17-2009, 03:11 AM   #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 !!..
shen747 is offline   Reply With Quote
Old 09-17-2009, 04:41 AM   #6
The larch
 
Join Date: May 2006
Posts: 3,082
It seems your problem is Why am I getting errors when my template-derived-class uses a member it inherits from its template-base-class?

Edit: oops, it was the next one.
__________________
I might be wrong.

Quote:
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).
anon is offline   Reply With Quote
Old 09-17-2009, 04:53 AM   #7
Dae
Deprecated
 
Dae's Avatar
 
Join Date: Oct 2004
Location: Canada
Posts: 944
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.0 (lambda branch), Boost 1.40.0, Code::Blocks 8.02, Ubuntu 9.04 010001000110000101100101
Dae is offline   Reply With Quote
Old 09-17-2009, 12:38 PM   #8
Rampaging 35 Stone Welsh
 
abachler's Avatar
 
Join Date: Apr 2007
Posts: 2,926
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.
__________________
He is free, you say. Ah! That is his misfortune… These men… [have] the most terrible, the most imperious of masters, that is, need. … They must therefore find someone to hire them, or die of hunger. Is that to be free? - Simon Linguet
abachler is online now   Reply With Quote
Old 09-17-2009, 12:59 PM   #9
The larch
 
Join Date: May 2006
Posts: 3,082
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.

Quote:
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).
anon is offline   Reply With Quote
Old 09-17-2009, 01:20 PM   #10
Ex scientia vera
 
Join Date: Sep 2007
Posts: 426
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."
IceDane is offline   Reply With Quote
Old 09-17-2009, 09:52 PM   #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.
shen747 is offline   Reply With Quote
Reply

Tags
c++, dev-c++, java, jni, vc++

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bloodshed Dev Stops Compiling bengreenwood C++ Programming 4 11-11-2007 03:25 PM
dev c++ project option rodrigorules C++ Programming 2 06-07-2006 08:32 PM
Dev C++ takes 3 mins to reload a project phil General Discussions 7 09-01-2005 02:32 PM
DJGPP project problems Bubba A Brief History of Cprogramming.com 4 06-08-2002 07:16 PM
Compiling assembly code into project knutso C Programming 2 02-26-2002 03:24 PM


All times are GMT -6. The time now is 02:53 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22