|
Try posting your question here[^] as well.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
i would add a dll in my project but i don't know how i can introduce him, iam viewing a reference but i can't add him, i work with Visual Studio 2005 please help me.
Thank you very mutch.
|
|
|
|
|
Do you want to add a new DLL project to a solution or use a DLL with a current project?
To use a DLL with a current project - Depends on how you are linking (at runtime) to the DLL:
explicitly or implicitly.
Explicitly - you need to add code which loads the DLL and obtains pointers to functions in the
DLL.
Implicitly - you need an import library (.lib file) created from the DLL. Add the .lib file to
yor project and link.
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Yes explicity, they are an exemple in C, they Use Netica.dll and Netica.lib,
but in C they are not .h and .cpp, i don't know how i add the .dll and .lib?
|
|
|
|
|
You can add the lib file to your project _ project menu choose add existing item and select the
lib file.
For the dll - it only needs to be available at runtime - the project doesn't need it.
It needs to be in one of thes places (I ripped this from the docs):
"1) The directory from which the application loaded.
2) The current directory.
3) The system directory. Use the GetSystemDirectory function to get the path of this directory.
4) The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.
5) The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
6) The directories that are listed in the PATH environment variable."
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
They are 3 way to add, in Ressource Files? or in Source Files? or in Header Files. For exemple when i add Netica.lib or Netica.dll in Header Files a message apear "Matching Custom build rule not found"
Thank you.
|
|
|
|
|
I didn't think it needed a custom build rule.
Try right click on project in solution explorer and choose properties.
Navigate to the Linker/Input section and on the line that says "Additional Dependencies" you can
add the lib pathname there.
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
ok, i have adding a Netica.dll in additional Dependencies, and for Netica.dll? where i add her?
|
|
|
|
|
Add the lib, not the dll, to the project.
The project doesn't need the dll. The dll needs to be located where the system can find it at
runtime - I gave those places in a previous reply
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
ok, but when i write net_bn *net;, they are error: undeclared identifier, so this exemple work in C,but C and C++ not identique, the exemple in C, They are Netica.dll, Netica.lib, Netica.h, Netica.cpp, NeticaEx.h and Demo.c, and code of Demo.c in the top they are:
#include "Netica.h"
#include "NeticaEx.h"
i must itegrate this two line in c++?
it's extra if you can help me, a code was in http://www.norsys.com/downloads/NeticaAPI_Win.zip[^]
-- modified at 14:48 Saturday 24th February, 2007
|
|
|
|
|
Yes you'll need those #include lines in any source module that uses functions/classes in the
DLL. Otherwise it won't compile.
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
ok, i try it and i tell a result,.
MessageBox("my message") dont work in Visual Studio 2005 so It work in C++ 6.0, can you help me to show message?
thank you.
|
|
|
|
|
abbd wrote: MessageBox("my message") dont work in Visual Studio 2005
What do you mean by "dont work"??
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
it apear MessageBoxW("..........."), and not MessageBox; i work with MFC application, i wouls show message.
|
|
|
|
|
abbd wrote: it apear MessageBoxW
Appears where? I can't see what's going on there so please be specific!
Maybe your project needs to be compiled with unicode enabled?
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
ok
When you write a code for exemple, 'messageBox' and you pass a cursor of mouss, it apear MessageBoxW and it return int, i woul show amessage .thank you
|
|
|
|
|
That's fine. Most of the windows APIs have both ANSI and Unicode versions (in the case of
MessageBox() there's MessageBoxA() and MessageBoxW()). If you are seeing MessageBoxW then that
means your app is being compiled for Unicode.
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
but why i can show a message, when write Messagebox.show don't work, like printf !!!, i have a Mfc application
|
|
|
|
|
I'm sorry I'm not understanding. What are you trying to do - show a message box or use printf?
And what is not working - It's not compiling? Not working a runtime?
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Thank you very mutch to answer my questions , but last thinks, when i add Netica.lib on Linker-> input when i debug a error appear:
fatal error LNK1104: cannot open file 'C:\Documents.obj'
Thank you very mutch
|
|
|
|
|
Somewhere in the linker settings for your project, documents.obj is expected.
It's looking for it in the C:\ folder - that's probably not where it is.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
hello everybody in this forum.
i have some problems .
i want to make a dll in C++ that i can use in C# i declare the function by
<br />
extern "C" __declspec(dllexport) void DisplayMessage()<br />
{<br />
std::cout << "Hello world !!!";<br />
}<br />
when i call this function , from C# using interoperability services , the calling is excellent and i can call this function from Managed code.
ok but when i try to make a class for the following example
<br />
class Grade<br />
{<br />
public:<br />
void DisplayMessage();<br />
};<br />
<br />
public Grade<br />
{<br />
void DisplayMessage()<br />
{<br />
std::cout << "Hello Snouto Override" <<std::endl;<br />
}<br />
}<br />
<br />
<br />
extern "C" __declspec(dllexport) void ShowMessage()<br />
{<br />
Grade current_grade;<br />
current_grade.DisplayMessage();<br />
}<br />
then when i create and compile the above code into .dll using win32 Dll Project.
<br />
[DllImport(mydll.dll)]<br />
public static extern void ShowMessage();<br />
<br />
<br />
private static void Main(string[] args)<br />
{<br />
ShowMessage();<br />
}<br />
i have error telling me NullReferenceException was thrown but i don't know why.
Human knowledge belongs to the world.
|
|
|
|
|
What the language between C#.NET and VisualC++/MFC suit to develope on .NET framework?
|
|
|
|
|
if you're doing .Net, i recommend C#
|
|
|
|
|
Hi all.
I need help, in my program I use in my program
SC_HANDLE schService;
but I have prblem with it.
I include windows.h in project and write
::SC_HANDLE schService;
But I still have compile error. I dont know why?
|
|
|
|