Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 288901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:51:30+00:00 2026-05-12T05:51:30+00:00

I’m a newbie in this vast world of programming. I’ve been given some codes

  • 0

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.

This is the makefile content:

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) @<<
    $(OBJDIR)\$(STACKS)main.$(OBJSUFFIX)
    $(OBJDIR)\state.$(OBJSUFFIX)
    $(OBJDIR)\scl_cli.$(OBJSUFFIX)
    $(LIBS)
    $(WINDIS) $(SOCKLIB) $(REGLIB)
<<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) @<<
            $(CDEFS)
            $(COMPOUT)$(OBJDIR)\$(STACKS)main.$(OBJSUFFIX)
            conmain.c
<<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) @<<
            $(CDEFS)
            $(COMPOUT)$(OBJDIR)\scl_cli.$(OBJSUFFIX)
            scl_cli.c
<<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) @<<
            $(CDEFS)
            $(COMPOUT)$(OBJDIR)\state.$(OBJSUFFIX)
            state.c
<<NOKEEP

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. All are unresolved external symbol errors
Example:

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

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:51:30+00:00Added an answer on May 12, 2026 at 5:51 am

    If I were you I’d think twice before migrating the build within the IDE. I understand that seems more confortable to you, but the builtin build facilities are really limited.

    Visual Studio’s builtin build system does not scale ! When your project reaches a certain size, it becomes more of a hindrance than anything else. Microsoft recognizes this fact and currently pushes for their alternative called MSBuild.

    Try modifying a compile option when your solution contains over 80 different subprojects… It’s a mouse clic fest, tedious and error prone…

    At this point you’ll have the following options :

    1. Editing the project files manually (still an awful lot of files).
    2. Generating the Visual Studio solution from a description.
    3. Integrate an alternative build system within the IDE (if that exists).
    4. Using a more adequate external build system and call it from the IDE (you also get the opportunity to become cross platform).

    These are make variants (build is driven by Makefiles or similar):

    • nmake: probably the least powerful, windows only
    • OMake: cross platform (nice)
    • Scons: cross platform (never used it)
    • CMake: cross platform (never used it)
    • Rake: cross platform (sucks)
    • gmake: cross platform but expect issues with paths on windows (comes from the ‘nix world)

    These are ant variants (build is driven by xml descriptions instead of makefiles):

    • nant
    • MSBuild (from Microsoft)

    Anyway, remember that compiling outside the IDE does not prevent you from using it for editing, debugging (and the debugger is nice) and so on !

    Regarding your issue, you forgot to add the libraries listed in the following excerpt:

    TAMLIB      = $(LIBDIR)\tam_$(NAMETAG).lib
    TAMCLIB     = $(LIBDIR)\tamc_$(NAMETAG).lib
    MMSLIB      = $(LIBDIR)\mmsc_$(NAMETAG).lib
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.