|
I am not exactly sure about these linker errors, but I have some similar problem with my project. After much scraching my head and reading forums I found that I was not building my library and executable using same runtime libraries. may be this is problem in your case also.
-Saurabh
|
|
|
|
|
The trouble is, there IS only one set of libraries in VC2005, the old ones have been removed.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sorry I think I was not clear enough.
I also had this problem in visual studio 2005 beta 2 and there are two type of runtime libraries - multithreaded(/MT) and multithreaded dll(/MD). So in my case I was using /MT to build the library and /MD to build the exe and hence the problem.
Hope this helps.
- Saurabh
|
|
|
|
|
Ah.... OK. I am using MD in every case. Thanks tho.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Don't want to appear dense, but are you sure about this? The projects that come with those libs specify /MT for the release build and /MTd for the debug build. Did you change it to /MD?
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
I am positive - I changed it to /MD to match the MFC app. I've had to put several #undef's into my project to get it to compile as /MT, which is what I'm trying now, as I can't find where _AFXDLL is being #defined.
I'm just building that now, having changed the libraries back and having re built them.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
I've had to put several #undef's into my project to get it to compile as /MT, which is what I'm trying now, as I can't find where _AFXDLL is being #defined.
_AFXDLL is defined when you specify that you want to "Use MFC in a Shared DLL". That setting is under Configuration Properties / General / Use of MFC.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
|
Thanks - I will read that later, it seems to be talking about my exact problem. YEah, I've read the forum for dcmtk over and over, and tried everything they suggest.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
Thanks - I will read that later, it seems to be talking about my exact problem. YEah, I've read the forum for dcmtk over and over, and tried everything they suggest.
No problem, the MSDN link pretty much discusses the include order and how to deal with.
Good luck...
-------------------------------
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Actually, while these are broadly the errors I am getting, they are not for new, delete or DllMain, so I think this isn't going to solve my problem. It could be a step in the right direction tho....
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
Actually, while these are broadly the errors I am getting, they are not for new, delete or DllMain, so I think this isn't going to solve my problem. It could be a step in the right direction tho....
Problems with new and delete? How’s that possible?
This maybe a rather silly suggestion, but have you created a generic app to test the DLL with? I see from previous posts that the DLL was not written in VS2005; perhaps more work is needed on the DLL to get it compliant with the language changes.
-------------------------------
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Hi all,
I am learning mysql database on c++.
I have a problem for function mysql_list_dbs():
how to get all database name in mysql server?
code is:
---------------------------------------------
MYSQL_RES*pRes=mysql_list_dbs(pMySQL,0);
if(pRes==0) return 1;
//don't know how to enum or fetch all dbs here.
---------------------------------------------
I can not find any sample of using the function.
do you know any links or code which are next step for the function?
thanks
includeh10
|
|
|
|
|
I need the MainFrame of my MDI app to be split (with CSplitterWnd), and subsequent CViews to be created in one of the CSplitterWnds. Is this possible?
Basically, I'm trying to get the MS Outlook look (the sidebar) in an MDI app.
Thanks
|
|
|
|
|
yes
i think the wizard for 6 and 7 both have the option to start yourp roject like that too
otherwise you create the splitters in CMainFrame::OnCreateClient
there is some example code how to do it in the msdn info on CSplitterWnd also
|
|
|
|
|
Hi!
I have the same problem. The MSDN did not really help.
Similar to splitting child-windows (in CChildFrame),
I tried to split CMainFrame. But what have I to insert
into the right pane - so that there are the child-windows.
CMainFrame can not work...
Alex
|
|
|
|
|
Hi all,
I'm trying to use sedtech.com's quick pdf library in Visual C 6 and it appears that they are no longer bothering to support their product so I thought I'd try here.
My application blows up when calling:
iSEDSetHTMLNormalFont( "Default", 0 );
to set the font type. I have the older version (4.??) of the
library.
Anyone have any IDEAS???
Thanks!!
Dave
|
|
|
|
|
hello
I have a question
In order to make smaller exes I use some linker options
that I got form somewhere I forgot from where
I understand pretty much what they do exept one :
#pragma comment(linker,"/base:0x13140000")
Anyway that is besides the point
I put these options:
#pragma optimize("gsy",on)
#pragma comment(linker,"/RELEASE")
#pragma comment(linker,"/ENTRY:main")
#pragma comment(linker,"/MERGE:.rdata=.data")
#pragma comment(linker,"/MERGE:.text=.data")
#pragma comment(linker,"/MERGE:.reloc=.data")
#pragma comment(linker,"/SECTION:.text,EWR /IGNORE:4078")
#pragma comment(linker,"/FILEALIGN:0x200")
#pragma comment(linker,"/base:0x13140000")
#pragma comment(linker,"/stub:stub.exe")
in a vc 7 win32 empty project
and when i put this:
void main()
{
char * ce_scrie=new char[100];
}
the project is buildable but then it gives out a error of the debug don't send kind(you know) and when I debug it I get a wierd error I have yet to see
Unhandled exception at 0x77f5171c in versiune_de_ie.exe: 0xC0000005: Access violation reading location 0x00000010.
the same stuff with vc 6 gets me this:
C:\Program Files\Microsoft Visual Studio\MyProjects\SmallVcExe\SmallVcExe.c(31) : error C2065: 'new' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\SmallVcExe\SmallVcExe.c(31) : warning C4047: 'initializing' : 'char *' differs in levels of indirection from 'int '
C:\Program Files\Microsoft Visual Studio\MyProjects\SmallVcExe\SmallVcExe.c(31) : error C2143: syntax error : missing ';' before 'type'
C:\Program Files\Microsoft Visual Studio\MyProjects\SmallVcExe\SmallVcExe.c(31) : error C2143: syntax error : missing ';' before '['
C:\Program Files\Microsoft Visual Studio\MyProjects\SmallVcExe\SmallVcExe.c(31) : warning C4091: ' ' : ignored on left of 'char ' when no variable is declared
why is this?
|
|
|
|
|
I have a question:
supposing I call the
LookupAccountSid(NULL, ptiUser->User.Sid, szUser, pcchUser,szDomain, pcchDomain, &snu))
and I get the sid how can I print this sid?
|
|
|
|
|
In LookupAccountSid, the SID is an input parameter and what you get is user and domain names as character strings...
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
yes you are right but anyway I have the sid I just want to print it how do I do that ?
|
|
|
|
|
|
LPSTR * StringSid;
ConvertSidToStringSid(ptiUser->User.Sid,StringSid);
this gets me the run-time error " the variable StringSid is being used withouth having been initialized
so I try to initialize it:
LPSTR toader=new char[1024];strcpy(toader," ");
LPSTR * StringSid=&toader;
but this gets me a error also about access memory violation
what is the good way of doing this?
|
|
|
|
|
You're not calling it quite right.
ConvertSidToSidString(sid, &string);
you must pass a *pointer* to a pointer, not just the address of the string. The function then modifies this pointer and returns the string this way.
james
http://www.catch22.net
|
|
|
|
|
hi,
i have provided a context menu for copy/paste operations between two listctrl's in my application. but the problem i am facing is that how will i identify from which list ctrl the user has clicked copy and in which ctrl the user clicks paste from the context menu. i.e whether i have to copy from listctrl 1 to listctrl 2 or vice-versa. can anyone help me out
thanks
aditya
|
|
|
|