Allright, thanks a lot!
jantimmerman
Posts
-
Open file using IE [VC++ 2005] -
Open file using IE [VC++ 2005]Hello, I've created a .htm help file and i'd like to open with IE it from within my program. Such thing does not seem as easy as I thought. If anyone could help me out it will be greatly appreciated. best regards, Jan Timmerman.
-
printing content of class view [VC++ 2005]Hello, Is it possible to throw the entire content of the Class View to the printer to create a listing of all classes and classmembers? best regards, Jan Timmerman
-
Including .dll in /clr:pure project [VC++ '05]Great, it works! i've modified the function call to
extern "C" void __cdecl extiteratie( [arguments] )
(from the error messages I noticed the compiler ignores the "__declspec(dllimport)" part when including __cdecl) Also I added an underscore to the function export in the Fortran code which was needed by __cdecl. An alternative is (most likely but not tested) to use __stdcall in the export. I do not think it makes much difference whether I use __stdcall or __cdecl? Thanks a lot! Jan Timmerman -
Including .dll in /clr:pure project [VC++ '05]Thanks for your reply: Well that was about where I was aiming at. I never heard of the "#import" directive before so I will have to look into that. I have not too much experience with Visual studio. Perhaps I should explain a little more about the situation. Currently I have a ".lib" and a ".dll" generated by Compaq Visual Fortran. I've declared the function called from the .dll as follows:
extern "C" void __declspec(dllimport) extiteratie( [arguments] )
First I get the warning:TFortranInterface.cpp(27) : warning C4272: 'extiteratie' : is marked __declspec(dllimport); must specify native calling convention when importing a function.
after that an errorerror LNK2031: unable to generate p/invoke for "extern "C" void __clrcall extiteratie( float*, float*, (...) float* )" (?extiteratie@@$$J0YMXPAM000000000000000PAH110@Z); calling convention missing in metadata
(After this an unresolved token error which is most likely caused by the previous error.) I am currently using a native class as interface because I need to pass the function in the .dll a set of pointers which will be filled with results. The questions: 1. With /clr:pure I cannot use that native class? 2. Any idea what the error could mean (and/or perhaps an alternate declaration for the function in the .dll?) (3. what does #import do?) best regards, Jan Timmerman -
Including .dll in /clr:pure project [VC++ '05]Hello, Is it possible to include a .dll in a /clr:pure project? I am currently using unmanaged code for this. I was wondering if it is also possible with a /clr:pure project which does not allow native C++? Including a .dll can be done with C#. (Full setting is "Pure MSIL Common Language Runtime Support (/clr:pure)" in the project properties -> General) best regards, Jan Timmerman
-
Declare in form1.h causes errorPerhaps that might work. This does not explain though why it is allowed to say
int test;
in stdafx.h (which is included also in a lot of places) Also I thoughtint test;
is a declaration here. It would be illegal to writeint test=3;
. I will give your suggestions a closer look, thanks for your quick replies! -- modified at 7:47 Monday 6th March, 2006 Well, it works, thanks a lot! -
Declare in form1.h causes errorHello, I was experiencing a strange error that I tracked down to be a declaration in Form1.h I attemped to reproduce the problem in a brand new project and to my surprise: the error appeared again. In the new "windows forms" project test1.cpp:
#include "stdafx.h" #include "form1.h"
Added to form1.hint test;
error: test.obj : error LNK2005: "int test" (?test@@$$Q3HA) already defined in IncludeTest.obj D:\VC\IncludeTest\Debug\IncludeTest.exe : fatal error LNK1169: one or more multiply defined symbols found. I have triedint test
in stdafx.h. This does compile though stdafx.h is also included in both the main and test.cpp. Project available here (44k, created with VC++ 2005) I thought this was according to c++ language rules, but apparently I am doing something wrong? Best regards, Jan Timmerman -
Cannot include <gdiplus.h>Ok, it builds. Only thing that remains is the warning. Thanks for the help!
-
Cannot include &lt;gdiplus.h&gt;Hello, I am new to Visual C++ (not to C++ though) and I am trying to draw a curve with GDI+. Since I kept getting the same linker errors, I made a new project in which I only included <windows.h> and <gdiplus.h>. The result: first this warning: (all linker errors)
warning LNK4248: unresolved typeref token (0100001A)for 'Gdiplus.GpCachedBitmap'; image may not run
And then several errors of this typeerror LNK2028: unresolved token (0A000049) "extern "C" enum Gdiplus::Status __stdcall GdipCloneImage(class Gdiplus::GpImage *,class Gdiplus::GpImage * *)" (??1PrivateFontCollection@Gdiplus@@$$FUAM@XZ)
I have installed Visual C++ 2005 Express and the Windows Server 2003 SDK and added the path to the VC++ Directories. Running on XP with SP2 Thanks in advance. Best regards, Jan Timmerman -- modified at 3:09 Thursday 9th February, 2006