Posts: 4,307
Threads: 63
Joined: May 2003
well the complete crap that devc++ is, it sends some useless commands to the mingw compiler/linker which gives warnings like "undefined reference to blah and winmain()" where as actually everything is defined and proper flags are set.
I tried compiling my program which comprised of several modules in Linux using the gcc compiler and it worked without a hitch. No errors and no warnings.
Posts: 3,616
Threads: 287
Joined: Jan 2003
I *believe* that you need to specify some command-line linker args with the project...
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 4,307
Threads: 63
Joined: May 2003
ahem...if you read me post correctly i did mention that everything is defined and all flags are set.
Posts: 530
Threads: 17
Joined: May 2002
Quote:Dont use DevC++ its useless.
....
My feelings were same until a few days ago when i tried using modules.
It sucks big time!!!
Your doing something wrong then. Can we see your code? Im working with 20 seperate C files(thats 20 .c files, 19ish .h files), several libraries(lua,fmod,allegro and a couple more still to be added) and have many compile time warning flags set and i have no problems with dev-cpp. (no warnings nada). And im not setting any flags either.
And zack, including code in headers is just asking for trouble. You never want to included C file, never. Compile several files together and include the header instead.
Posts: 4,307
Threads: 63
Joined: May 2003
Its not a problem in my code. As I got my friend to compile the modules in VC++. I compiled it using DJGPP. I compiled it in Linux. It worked everywhere except devc++.
Posts: 3,616
Threads: 287
Joined: Jan 2003
So basically, HR, you mean always have Your main module, a second module which you #include, and before that, a header module which you #include?
Code:
/* main.c */
#include "headers.h"
#include "second.c"
int main() {
printBlarg();
return 0;
}
Code:
/* headers.h */
#include <stdio.h>
void printBlarg(void);
Code:
/* second.c */
void printBlarg(void) {
printf("Blarg!");
}
That what you mean?
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 4,307
Threads: 63
Joined: May 2003
no! he means you are not supposed to #include a .c/.cpp (C/C++ source) file.
have a look at my source.
Posts: 3,616
Threads: 287
Joined: Jan 2003
Ohhh...then you link them together...I see.
But why not juse #include them?
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 3,288
Threads: 167
Joined: Nov 2001
Right now, I only have QuickC. So I might as well go with it until I know enough. :*)
Antoni: That's alot to print. :*)
Nath. So you have some QC tuts?
Posts: 3,616
Threads: 287
Joined: Jan 2003
Don't use QuickC - as mentioned above, it's slow.
Try Mingw32 with Dev-C++.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.