Go Back   CodeCall Programming Forum > Software Development > C and C++
Register Blogs Search Today's Posts Mark Forums Read

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-29-2009, 11:09 PM
Newbie
 
Join Date: Jun 2009
Posts: 8
jjplaw is an unknown quantity at this point
Import Makefile settings to VS2005 IDE

Hi,

I'm a newbie in this vast world of programming. I've been given some codes in C which are compiled & linked using makefile. I can compile the code using nmake from VS2005. Now i want to build the program in C++ VS2005 IDE.
From a quick google search, there seems to be no automated functions in importing makefile settings to VS IDE.
I tried to include all the necessary dependecies(header and lib files) stated in the makefile to VS but i get a lot of linking errors. I'm not even sure where to start looking to solve the issue. I hope the gurus can help me out.

The makefile including two other related makefile is attached to this post.
[1]makefile.mak
[2]compiler.mak
[3]options.mak



In VS I've:
[1] Create a new empty project
[2] Add exisiting sources (c files and header files)
[3] Additional Include Directories: ..../include and ..../src/make7
[4] Additional Library Directories: ..../lib
[5] Build project...

I got 74 linker errors the VS output after attempted build. Example:
Code:
conmain.obj : error LNK2001: unresolved external symbol _MMSd_freeDsMemFunction
Code:
scl_cli.obj : error LNK2019: unresolved external symbol _TAM_parse_address referenced in function _ResolveServerAddress
I've not dealt with makefiles before. I apologize if this post may sound very newbie style and amatuer-ish. I'm new but I'm willing to learn.

Any advice and comment is greatly appreciated.

jjplaw
Attached Files
File Type: txt makefile.mak.txt (3.3 KB, 10 views)
File Type: txt compiler.mak.txt (678 Bytes, 10 views)
File Type: txt options.mak.txt (347 Bytes, 11 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-30-2009, 12:01 PM
WingedPanther's Avatar
Super Moderator
 
Join Date: Jul 2006
Age: 36
Posts: 11,435
WingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud of
Re: Import Makefile settings to VS2005 IDE

Make files create a lot of different settings, compiler options, linker options, etc. You would have to read the make files and recreate each setting for each file/project. Effectively, you have to replace ALL the logic of the make file in your project. This is not likely to be a trivial task.
__________________
CodeCall Blog | CodeCall Wiki | Shareware
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-30-2009, 10:38 PM
Newbie
 
Join Date: Jun 2009
Posts: 8
jjplaw is an unknown quantity at this point
Re: Import Makefile settings to VS2005 IDE

WingedPanther, Thanks for the info on makefiles.
Could you give me some examples of what other settings in the makefile that are recreated in VS? Currently, i only know to add include directories for compiler options and add lib directories for linker options.

[1] The source codes has 3 C files. According to makefile settings, one of the C file is compiled to generate an OBJ file with a different name; conmain.c==>tcpmain.obj
Is this also one of the settings i have to recreate in VS? or it doesnt effect anything in VS?

[2] The errors i get from VS IDE are all unresolved external symbols when linking. All the library files are already included in the additional lib directories option. Is there any additional option/settings in VS 2005 that can output more information of the build error?

[3] From a google search, someone suggested to change the compiler options in VS to "Compiler as C Code" because i'm using a C++ compiler to compile C codes. Is this true? I tried it but it didnt work also.

[4] In the makefile, there is a symbol @<<. What does it do? Is it two seperate symbols @ and <<? I cant seem to find the answer on google.

Please advise.

justin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-01-2009, 12:03 AM
WingedPanther's Avatar
Super Moderator
 
Join Date: Jul 2006
Age: 36
Posts: 11,435
WingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud of
Re: Import Makefile settings to VS2005 IDE

Unfortunately, I'm not even close to an expert on VS, which has significantly different compiler/linker options than GCC. I would start with documentation on nmake, such as NMAKE Reference
__________________
CodeCall Blog | CodeCall Wiki | Shareware
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-02-2009, 11:55 PM
Newbie
 
Join Date: Jun 2009
Posts: 8
jjplaw is an unknown quantity at this point
Re: Import Makefile settings to VS2005 IDE

Thanks for your comments and advice.... There are so many things to learn about programming and so little time to do it (T_T)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Makefile Tutorial Jordan Linux Tutorials, Guides and Tips 2 10-12-2009 03:00 AM
Java: encrypt text into an image Sinipull Classes and Code Snippets 0 06-16-2009 04:59 PM
Incompatible types foung error messege Manfrizy Java Help 1 11-28-2008 11:31 AM
Verification Problem mosesff Java Help 7 07-02-2008 12:57 PM
Help With Implementing Message Boxes mosesff Java Help 5 06-23-2008 01:27 PM


All times are GMT -5. The time now is 06:54 AM.


vBulletin v3.8.0 ©2010, Jelsoft Enterprises Ltd.


no new posts

LinkBacks Enabled by vBSEO 3.1.0