Click here to Skip to main content
15,909,629 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Send Sms using visaul c++ 6 Pin
nolanl9-Nov-03 23:31
nolanl9-Nov-03 23:31 
GeneralCButton declaration Pin
Ahmed Galal8-Nov-03 2:30
Ahmed Galal8-Nov-03 2:30 
GeneralRe: CButton declaration Pin
Antti Keskinen8-Nov-03 12:05
Antti Keskinen8-Nov-03 12:05 
GeneralRe: CButton declaration Pin
Ahmed Galal8-Nov-03 12:11
Ahmed Galal8-Nov-03 12:11 
Generalclass with static functions and variables Pin
Kuniva8-Nov-03 0:00
Kuniva8-Nov-03 0:00 
GeneralRe: class with static functions and variables Pin
ZoogieZork8-Nov-03 2:47
ZoogieZork8-Nov-03 2:47 
GeneralRe: class with static functions and variables Pin
Anonymous8-Nov-03 3:25
Anonymous8-Nov-03 3:25 
GeneralRe: class with static functions and variables Pin
Kuniva8-Nov-03 4:20
Kuniva8-Nov-03 4:20 
Woops, now i have another problem Frown | :(

You see the thing i'm trying to compile is a DLL. A layered service provider to be exact (not that i think it matters much). But to compile it i always used the makefile, because when i made a workspace for it in VC it would compile, but it just wouldnt work right. So now i have my class with all the static functions and variables in the DLL project. But now when i try to compile with the makefile it gives me another linker error. An unresolved external for a public function from my class. I don't know much (or anything) about makefiles, just that they give options to the compiler and linker or something so i can't really understand why it doesnt work. My guess would be that when i compile it in VC it has other options set or something, so it will compile but the result will be a DLL that doesnt work right. Here is the makefile:

!include <win32.mak>

!IFNDEF NODEBUG
.cpp.obj:
	$(cc) $(cdebug) $(cflags) $(cvarsdll) -DSTRICT -YX\
        /D "DEBUG_TRACING"\
        /D "TRACING" /Od /D "_DEBUG" $<
!else
.cpp.obj:
	$(cc) $(cdebug) $(cflags) $(cvarsdll) -DSTRICT -YX -DNODEBUG $<
!endif
CPP_FILES= dbuffmgr.cpp\
           doverlap.cpp\
	   dasyncw.cpp\
           dworker.cpp\
           dcatalog.cpp\
           dcatitem.cpp\
           dllmain.cpp\
           dprovide.cpp\
           dsocket.cpp\
           spi.cpp\
           trace.cpp\
           dthook.cpp


OBJS= $(CPP_FILES:.cpp=.obj)

all: lsp.dll inst_lsp.exe

lsp.dll: $(OBJS)
	$(link) $(linkdebug) $(dlllflags) \
    -map \
	-export:WSPStartup \
	-out:$*.dll $(OBJS) $(guilibsdll) ws2_32.lib

inst_lsp.obj: inst_lsp.cpp
	$(cc) $(cdebug) $(cflags) $(cvars) inst_lsp.cpp

inst_lsp.exe: inst_lsp.obj
	$(link) $(linkdebug) $(conlflags) -out:$*.exe inst_lsp.obj\
        rpcrt4.lib $(conlibs) ws2_32.lib sporder.lib

clean:
    -del *.obj
	-del *.dll
	-del *.pch
	-del *.exp
	-del lsp.lib


It creates two things basically, an .exe and a .dll. It also exports the WSPStartup function so windows can access it. But as i said i get an unresolved external linker error on the static public function of my class since i added my class. Frown | :(

P.S.: I try to call this function from some global function in the DLL like:
CMyStaticClass::MyFunction(someparameters);

Kuniva
--------------------------------------------
GeneralWin32 message window Pin
pranavamhari7-Nov-03 23:33
pranavamhari7-Nov-03 23:33 
GeneralRe: Win32 message window Pin
Antti Keskinen8-Nov-03 12:18
Antti Keskinen8-Nov-03 12:18 
GeneralRe: Win32 message window Pin
Peter Molnar8-Nov-03 13:37
Peter Molnar8-Nov-03 13:37 
GeneralRe: Win32 message window Pin
pranavamhari8-Nov-03 15:05
pranavamhari8-Nov-03 15:05 
QuestionDo streams always have to be passed by reference? Pin
Link26007-Nov-03 22:44
Link26007-Nov-03 22:44 
AnswerRe: Do streams always have to be passed by reference? Pin
Andrew Walker8-Nov-03 13:17
Andrew Walker8-Nov-03 13:17 
General.lib in 6.0 Pin
LOSTTWARE.com7-Nov-03 21:11
LOSTTWARE.com7-Nov-03 21:11 
GeneralRe: .lib in 6.0 Pin
Mike Dimmick7-Nov-03 23:21
Mike Dimmick7-Nov-03 23:21 
GeneralChanging Printer Resolution at Run Time Pin
Tejas H Shah7-Nov-03 20:55
Tejas H Shah7-Nov-03 20:55 
GeneralLooping through all Outlook folders Pin
Anonymous7-Nov-03 20:33
Anonymous7-Nov-03 20:33 
GeneralLooping through all Outlook folders Pin
Anonymous7-Nov-03 20:33
Anonymous7-Nov-03 20:33 
GeneralRe: Looping through all Outlook folders Pin
Amit Dey8-Nov-03 0:43
Amit Dey8-Nov-03 0:43 
GeneralRe: Looping through all Outlook folders Pin
p_peto1-Jun-05 19:39
p_peto1-Jun-05 19:39 
GeneralDirectShow Video Standard Question Pin
Atif Mushtaq7-Nov-03 19:59
Atif Mushtaq7-Nov-03 19:59 
Generalredistribute crystal report 6.0 Pin
murali_utr7-Nov-03 18:30
murali_utr7-Nov-03 18:30 
GeneralRe: redistribute crystal report 6.0 Pin
Tejas H Shah7-Nov-03 21:38
Tejas H Shah7-Nov-03 21:38 
GeneralRe: redistribute crystal report 6.0 Pin
murali_utr7-Nov-03 22:09
murali_utr7-Nov-03 22:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.