Click here to Skip to main content
15,902,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone,

I did download some sample code from a web site. But i am not sure how shall i compile the code.

The downloaded folder contains
1. .mak file
2. .def file
3. Some .c, .h files
4. .rc files
5. .ico file

I am not sure who ever has created this project, Which IDE he might have used also there are nor project or solution files with it. After going through the code one thing i came to know is that its a WIN32 programming.

If i try adding these files in to the VS2010 solution it gives thousand of error.

I am not sure how shall compile this project.
Please help.

Thanks in advance
Posted

I guess it is a Win32 project built from command line, e.g. using NMAKE[^].
As about importing it into Visual Studio, probably you are out of luck (see, for instance: How to create Visual studio solution from make files?[^]. However you should be able to create a new project in Visual Studio and import most of your files into (and modify accordingly the remaining ones).
 
Share this answer
 
Typically websites that have source usually also tell you what they use to compile source. The make file should give you enough information to compile it with a different IDE/compiler (if it's well commented it will be easier). Have you opened the make file to see if there's notes in there as to the compiler?
 
Share this answer
 
Comments
sourabhmehta 7-Mar-13 23:16pm    
unfortunately that website has not given any information related to compiler. Though i am not much into mak files and related stuff. Still i looked into the .Mak file. But couldn't get some useful information. Below are the contents of makefile. Please let me know if you get something useful


PROJ = WINCOM
PROJFILE = WINCOM.MAK
DEBUG = 0

PWBRMAKE = pwbrmake
NMAKEBSC1 = set
NMAKEBSC2 = nmake
LINKER = link
ILINK = ilink
LRF = echo > NUL
BIND = bind
RC = rc
IMPLIB = implib
LFLAGS_G = /NOD /BATCH /CODEVIEW
LFLAGS_D = /NOF /NOP
LFLAGS_R = /NOF /NOP /BATCH
MAPFILE_D = NUL
MAPFILE_R = NUL
CC = cl
CFLAGS_G = /W3 /Gw /Zip /BATCH /Od
CFLAGS_D = /Od /FPa /Zi /Gi$(PROJ).mdt /Gs
CFLAGS_R = /Od /FPa /Zi /Gs
LLIBS_G = LIBW.LIB SLIBCEW
ASM = masm
AFLAGS_G = /Mx /T
AFLAGS_D = /Zi

DEF_FILE = WINCOM.DEF
OBJS = WINCOM.obj COMM.obj XMODEM.obj TERMINAL.obj
RESS = SETTINGS.res
SBRS = WINCOM.sbr COMM.sbr XMODEM.sbr TERMINAL.sbr

all: $(PROJ).exe

.SUFFIXES: .c .sbr .obj

SETTINGS.res : SETTINGS.RC C:\WINDEV\INCLUDE\windows.h wincom.h

WINCOM.obj : WINCOM.C C:\WINDEV\INCLUDE\windows.h wincom.h term.h comm.h

WINCOM.sbr : WINCOM.C C:\WINDEV\INCLUDE\windows.h wincom.h term.h comm.h

COMM.obj : COMM.C C:\WINDEV\INCLUDE\windows.h comm.h

COMM.sbr : COMM.C C:\WINDEV\INCLUDE\windows.h comm.h

XMODEM.obj : XMODEM.C C:\WINDEV\INCLUDE\windows.h wincom.h comm.h\
C:\C600\INCLUDE\stdio.h C:\C600\INCLUDE\conio.h\
C:\C600\INCLUDE\stdlib.h C:\C600\INCLUDE\memory.h

XMODEM.sbr : XMODEM.C C:\WINDEV\INCLUDE\windows.h wincom.h comm.h\
C:\C600\INCLUDE\stdio.h C:\C600\INCLUDE\conio.h\
C:\C600\INCLUDE\stdlib.h C:\C600\INCLUDE\memory.h

TERMINAL.obj : TERMINAL.C C:\WINDEV\INCLUDE\windows.h terminal.h

TERMINAL.sbr : TERMINAL.C C:\WINDEV\INCLUDE\windows.h terminal.h


$(PROJ).bsc : $(SBRS)
$(PWBRMAKE) @<<
$(BRFLAGS) $(SBRS)
<<

$(PROJ).exe : $(DEF_FILE) $(OBJS) $(RESS)
!IF $(DEBUG)
$(LRF) @<<$(PROJ).lrf
$(RT_OBJS: = +^
) $(OBJS: = +^
)
$@
$(MAPFILE_D)
$(LLIBS_G: = +^
) +
$(LLIBS_D: = +^
) +
$(LIBS: = +^
)
$(DEF_FILE) $(LFLAGS_G) $(LFLAGS_D);
<<
!ELSE
$(LRF) @<<$(PROJ).lrf
$(RT_OBJS: = +^
) $(OBJS: = +^
)
$@
$(MAPFILE_R)
$(LLIBS_G: = +^
) +
$(LLIBS_R: = +^
) +
$(LIBS: = +^
)
$(DEF_FILE) $(LFLAGS_G) $(LFLAGS_R);
<<
!ENDIF
!IF $(DEBUG)
$(LINKER) @$(PROJ).lrf
!ELSE
$(LINKER) @$(PROJ).lrf
!ENDIF
$(RC) $(RESS) $@


.c.sbr :
!IF $(DEBUG)
$(CC) /Zs $(CFLAGS_G) $(CFLAGS_D) /FR$@ $<
!ELSE
$(CC) /Zs $(CFLAGS_G) $(CFLAGS_R) /FR$@ $<
!ENDIF

.c.obj :
!IF $(DEBUG)
$(CC) /c $(CFLAGS_G) $(CFLAGS_D) /Fo$@ $<
!ELSE
$(CC) /c $(CFLAGS_G) $(CFLAGS_R) /Fo$@ $<
!ENDIF


run: $(PROJ).exe
WIN $(PROJ).exe $(RUNFLAGS)

debug: $(PROJ).exe
WIN CVW $(CVFLAGS) $(PROJ).exe $(RUNFLAGS)
Albert Holguin 7-Mar-13 23:28pm    
you should be able to compile that from the command line (assuming all the options are valid for your version of the compiler/linker)... http://msdn.microsoft.com/en-us/library/ms235639(v=vs.80).aspx[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900