Well, a really great problem for me :
There is a programm consisting of two moduls. The first one written on assembler language (Hutch's masm32 compiler) & the second one on C language (using Dev C++). How can I link these two files to one .exe ???
Dev C++ makes object files as ".o" files, but masm makes as ".obj"...
(when trying to make a project by puttin there first.c, second.obj , the compiler (Dev C++) says: " ...\Makefile.win [Build Error] No rule to make target second.o', needed byfirst.exe'. Stop."
Is it possible to link an .exe from such defferent moduls ???
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dev-C++ is not a compiler. It uses the GNU toolchain. That toolchain includes an assembler (as.exe). The GNU assembler syntax is not the same as Intel's however. By default it uses "AT&T" mnemonics, but has an "Intel" mode as an option. However, you may also find a number of incompatible assembler directives, so you will have to port the code no doubt. The GNU assembler manual may help you: http://sourceware.org/binutils/docs/as/index.html
The default GNU extension for assembler files is .s (don't ask me why!), I am not sure if Dev-C++ recognises .s and generates an appropriate build step. If not you can use the makefile customisation feature to include a makefile fragment containing an appropriate build rule for .s files.
It is likely that the .obj file is a different object file format that that handled by the GNU linker, but if it is not, then you need to add it as an object file, not a source file. Project->Options->Compiler options, Add object file/library.
Since it appears that "Hutch's masm32" is a Microsoft assembler clone, I assume that it generates Microsoft compatible object files. In that case your best bet may be to use Microsoft's free VC++ 2008 Express Edition. In fact that is probably your best bet in any case.
What does the assembler code do? If it is not a large amount of code, it is likely that it could be recoded in C.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, a really great problem for me :
There is a programm consisting of two moduls. The first one written on assembler language (Hutch's masm32 compiler) & the second one on C language (using Dev C++). How can I link these two files to one .exe ???
Dev C++ makes object files as ".o" files, but masm makes as ".obj"...
(when trying to make a project by puttin there first.c, second.obj , the compiler (Dev C++) says: " ...\Makefile.win [Build Error] No rule to make target
second.o', needed by
first.exe'. Stop."Is it possible to link an .exe from such defferent moduls ???
Dev-C++ is not a compiler. It uses the GNU toolchain. That toolchain includes an assembler (as.exe). The GNU assembler syntax is not the same as Intel's however. By default it uses "AT&T" mnemonics, but has an "Intel" mode as an option. However, you may also find a number of incompatible assembler directives, so you will have to port the code no doubt. The GNU assembler manual may help you: http://sourceware.org/binutils/docs/as/index.html
The default GNU extension for assembler files is .s (don't ask me why!), I am not sure if Dev-C++ recognises .s and generates an appropriate build step. If not you can use the makefile customisation feature to include a makefile fragment containing an appropriate build rule for .s files.
It is likely that the .obj file is a different object file format that that handled by the GNU linker, but if it is not, then you need to add it as an object file, not a source file. Project->Options->Compiler options, Add object file/library.
Since it appears that "Hutch's masm32" is a Microsoft assembler clone, I assume that it generates Microsoft compatible object files. In that case your best bet may be to use Microsoft's free VC++ 2008 Express Edition. In fact that is probably your best bet in any case.
What does the assembler code do? If it is not a large amount of code, it is likely that it could be recoded in C.
Clifford