Note that there are some explanatory texts on larger screens.

plurals
  1. POImport Makefile settings to VS2005 IDE
    primarykey
    data
    text
    <p>I'm a newbie in this vast world of programming. I've been given some codes in C which are compiled &amp; 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.</p> <p>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.</p> <p>This is the makefile content:</p> <pre><code>BASE = ..\.. !include $(BASE)\compiler.mak !include $(BASE)\options.mak CFLAGS = # Define the string used in the executable file name STACK_DEF = $(TCP_DEF) !ifdef TCP_DEF STACKS = tcp !endif CDEFS = $(STACK_DEF) $(AUTH_DEF) $(CLIENT_DEF) $(FILESERVICE_DEF) TARGET = $(STACKS)$(NAMETAG).$(EXESUFFIX) GOMDIR = $(BASE)\src\classlib DIRMAKE = $(BASE)\src\make7 LIBDIR = $(BASE)\lib OBJDIR = obj_$(NAMETAG) EXEDIR = $(BASE)\exes USERINC = $(BASE)\include # These libraries are always included TAMLIB = $(LIBDIR)\tam_$(NAMETAG).lib TAMCLIB = $(LIBDIR)\tamc_$(NAMETAG).lib MMSLIB = $(LIBDIR)\mmsc_$(NAMETAG).lib # Optional libraries !ifdef FILESERVICE_DEF FILELIB = $(LIBDIR)\file_$(NAMETAG).lib !endif !ifdef TCP_DEF TCPLIB = $(LIBDIR)\1006_$(NAMETAG).lib TCPINC = $(USERINC)\rfc1006.h !endif !ifdef CLIENT_DEF CLILIB = $(LIBDIR)\cli_$(NAMETAG).lib TCLILIB = $(LIBDIR)\tcli_$(NAMETAG).lib CLIINC = $(USERINC)\cliapi.h $(USERINC)\cli_cfg.h !endif SCLLIB = $(LIBDIR)\cscl_$(NAMETAG).lib LIBS = $(TCPLIB) $(TCLILIB) $(CLILIB) \ $(TAMLIB) $(TAMCLIB) $(MMSLIB) $(FILELIB) $(SCLLIB) INCLUDES = $(TCPINC) $(CLIINC) CC = $(COMPILER) INCFLAGS = /I$(DIRMAKE) /I$(USERINC) SRC = conmain.c \ state.c \ scl_cli.c OBJ = $(OBJDIR)\$(STACKS)main.$(OBJSUFFIX) \ $(OBJDIR)\state.$(OBJSUFFIX) \ $(OBJDIR)\scl_cli.$(OBJSUFFIX) all: $(TARGET) install: all clean: $(DELETE) $(OBJDIR)\$(STACKS)main.$(OBJSUFFIX) $(DELETE) $(OBJDIR)\state.$(OBJSUFFIX) $(DELETE) $(OBJDIR)\scl_cli.$(OBJSUFFIX) $(DELETE) $(TARGET) clobber: clean $(TARGET): $(OBJ) $(LIBS) $(LINK) $(LINKOUT)$(TARGET) @&lt;&lt; $(OBJDIR)\$(STACKS)main.$(OBJSUFFIX) $(OBJDIR)\state.$(OBJSUFFIX) $(OBJDIR)\scl_cli.$(OBJSUFFIX) $(LIBS) $(WINDIS) $(SOCKLIB) $(REGLIB) &lt;&lt;NOKEEP $(OBJDIR)\$(STACKS)main.$(OBJSUFFIX): \ conmain.c \ database.h \ services.h \ scl_cli.h \ $(USERINC)\uca_time.h \ $(DIRMAKE)\tamvend.h \ $(USERINC)\tam.h \ $(USERINC)\tam_tp.h \ $(USERINC)\tam_con.h \ $(USERINC)\casm.h \ $(DIRMAKE)\clivend.h \ $(USERINC)\cliapi.h \ $(DIRMAKE)\mmsdapi.h $(INCLUDES) $(CC) $(INCFLAGS) $(CFLAGS) @&lt;&lt; $(CDEFS) $(COMPOUT)$(OBJDIR)\$(STACKS)main.$(OBJSUFFIX) conmain.c &lt;&lt;NOKEEP $(OBJDIR)\scl_cli.$(OBJSUFFIX): \ scl_cli.c \ scl_cli.h \ database.h \ services.h \ $(USERINC)\uca_time.h \ $(DIRMAKE)\tamvend.h \ $(USERINC)\tam.h \ $(USERINC)\tam_tp.h \ $(USERINC)\tam_con.h \ $(USERINC)\casm.h \ $(DIRMAKE)\clivend.h \ $(USERINC)\cliapi.h \ $(DIRMAKE)\mmsdapi.h $(INCLUDES) $(CC) $(INCFLAGS) $(CFLAGS) @&lt;&lt; $(CDEFS) $(COMPOUT)$(OBJDIR)\scl_cli.$(OBJSUFFIX) scl_cli.c &lt;&lt;NOKEEP $(OBJDIR)\state.$(OBJSUFFIX): \ state.c \ scl_cli.h \ database.h \ services.h \ $(USERINC)\uca_time.h \ $(DIRMAKE)\tamvend.h \ $(USERINC)\tam.h \ $(USERINC)\tam_tp.h \ $(USERINC)\tam_con.h \ $(USERINC)\casm.h \ $(DIRMAKE)\clivend.h \ $(USERINC)\cliapi.h \ $(DIRMAKE)\mmsdapi.h $(INCLUDES) $(CC) $(INCFLAGS) $(CFLAGS) @&lt;&lt; $(CDEFS) $(COMPOUT)$(OBJDIR)\state.$(OBJSUFFIX) state.c &lt;&lt;NOKEEP </code></pre> <p>In VS I've:<br> [1] Create a new empty project<br> [2] Add exisiting sources (c files and header files)<br> [3] Additional Include Directories: ..../include and ..../src/make7<br> [4] Additional Library Directories: ..../lib<br> [5] Build project... </p> <p>I got 74 linker errors the VS output after attempted build. All are unresolved external symbol errors Example:</p> <pre><code>scl_cli.obj : error LNK2019: unresolved external symbol _TAM_parse_address referenced in function _ResolveServerAddressscl_cli.obj : error LNK2019: unresolved external symbol _TAM_parse_address referenced in function _ResolveServerAddress conmain.obj : error LNK2001: unresolved external symbol _MMSd_freeDsMemFunction </code></pre> <p>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.</p> <p>Any advice and comment is greatly appreciated.</p> <p>jjplaw </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload