How to use Octave with Visual Studio 2008 ?

View: New views
12 Messages — Rating Filter:   Alert me  

How to use Octave with Visual Studio 2008 ?

by Sunny127 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've tryied to create a new project in VS2008, copy all ocatave dlls to it's directory, linked all octave .lib files, and all compiled and linked ok, but when I ran the program, it crashed complaining about horrible errors. My guess is that Octave 3 was compiled with other dlls that VS2008 ... Any ideas ?

Re: How to use Octave with Visual Studio 2008 ?

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, May 28, 2008 at 10:52 AM, Sunny127 <wr1270@...> wrote:
>
> I've tryied to create a new project in VS2008, copy all ocatave dlls to it's
> directory, linked all octave .lib files, and all compiled and linked ok, but
> when I ran the program, it crashed complaining about horrible errors. My
> guess is that Octave 3 was compiled with other dlls that VS2008 ... Any
> ideas ?

There's a version of octave-3.0.1 that has been compiled with VS2008. Do
you use it? Can you show us the offending code? Can you debug to see
where it crash?

Michael.
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: How to use Octave with Visual Studio 2008 ?

by Sunny127 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Where can I download Octave compiled with Visual Studio 2008 ? I can't find it anywhere....

Sunny127 wrote:
I've tryied to create a new project in VS2008, copy all ocatave dlls to it's directory, linked all octave .lib files, and all compiled and linked ok, but when I ran the program, it crashed complaining about horrible errors. My guess is that Octave 3 was compiled with other dlls that VS2008 ... Any ideas ?

Re: How to use Octave with Visual Studio 2008 ?

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jun 1, 2008 at 11:37 AM, Sunny127 <wr1270@...> wrote:
>
> Where can I download Octave compiled with Visual Studio 2008 ? I can't find
> it anywhere....

It's available from octave-forge. See
http://sourceforge.net/project/showfiles.php?group_id=2888&package_id=40078

Michael.
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: How to use Octave with Visual Studio 2008 ?

by atabodur :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Sunny127 wrote:
I've tryied to create a new project in VS2008, copy all ocatave dlls to it's directory, linked all octave .lib files, and all compiled and linked ok, but when I ran the program, it crashed complaining about horrible errors. My guess is that Octave 3 was compiled with other dlls that VS2008 ... Any ideas ?
I've got similar problem. I try running simple example as shoving lib directory, include directory and the directory for dll's but complains about it needs some dll's at the linking stage:

OctaveDenVC.cpp:

#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
        Matrix A (2,2,0);
       

        std::cout<<A<<std::endl;

        return 0;
}



Linking...
LINK : warning LNK4199: /DELAYLOAD:OleAcc.dll ignored; no imports found from OleAcc.dll
OctaveDenVC.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Matrix::~Matrix(void)" (__imp_??1Matrix@@UAE@XZ) referenced in function _wmain
OctaveDenVC.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > & (__cdecl*)(class std::basic_ostream<char,struct std::char_traits<char> > &))" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z) referenced in function _wmain
OctaveDenVC.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class Matrix const &)" (__imp_??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABVMatrix@@@Z) referenced in function _wmain
OctaveDenVC.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Matrix::Matrix(int,int,double)" (__imp_??0Matrix@@QAE@HHN@Z) referenced in function _wmain
OctaveDenVC.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (__imp_?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) referenced in function "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z)
OctaveDenVC.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::put(char)" (__imp_?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z) referenced in function "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z)
stdafx.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall symbol_record::~symbol_record(void)" (__imp_??1symbol_record@@QAE@XZ) referenced in function "public: void * __thiscall symbol_record::`vector deleting destructor'(unsigned int)" (??_Esymbol_record@@QAEPAXI@Z)
stdafx.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl octave_value::operator delete(void *,unsigned int)" (__imp_??3octave_value@@SAXPAXI@Z) referenced in function "public: void * __thiscall octave_value::`vector deleting destructor'(unsigned int)" (??_Eoctave_value@@QAEPAXI@Z)
stdafx.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall octave_value::~octave_value(void)" (__imp_??1octave_value@@QAE@XZ) referenced in function "public: void * __thiscall octave_value::`vector deleting destructor'(unsigned int)" (??_Eoctave_value@@QAEPAXI@Z)
E:\OctaveDenVC\Debug\OctaveDenVC.exe : fatal error LNK1120: 9 unresolved externals
Build log was saved at "file://e:\OctaveDenVC\OctaveDenVC\Debug\BuildLog.htm"
OctaveDenVC - 10 error(s), 66 warning(s)

Re: How to use Octave with Visual Studio 2008 ?

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It would help to
1) know which octave version you use (and which binary package
you downloaded from octave-forge)
2) know what is the compilation and link commands that you're using

Michael.


On Fri, Sep 26, 2008 at 4:11 PM, atabodur <atabodur@...> wrote:

>
>
>
> Sunny127 wrote:
>>
>> I've tryied to create a new project in VS2008, copy all ocatave dlls to
>> it's directory, linked all octave .lib files, and all compiled and linked
>> ok, but when I ran the program, it crashed complaining about horrible
>> errors. My guess is that Octave 3 was compiled with other dlls that VS2008
>> ... Any ideas ?
>>
>
> I've got similar problem. I try running simple example as shoving lib
> directory, include directory and the directory for dll's but complains about
> it needs some dll's at the linking stage:
>
> OctaveDenVC.cpp:
>
> #include "stdafx.h"
> int _tmain(int argc, _TCHAR* argv[])
> {
>        Matrix A (2,2,0);
>
>
>        std::cout<<A<<std::endl;
>
>        return 0;
> }
>
>
>
> Linking...
> LINK : warning LNK4199: /DELAYLOAD:OleAcc.dll ignored; no imports found from
> OleAcc.dll
> OctaveDenVC.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: virtual __thiscall Matrix::~Matrix(void)"
> (__imp_??1Matrix@@UAE@XZ) referenced in function _wmain
> OctaveDenVC.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: class std::basic_ostream<char,struct
> std::char_traits<char> > & __thiscall std::basic_ostream<char,struct
> std::char_traits<char> >::operator<<(class std::basic_ostream<char,struct
> std::char_traits<char> > & (__cdecl*)(class std::basic_ostream<char,struct
> std::char_traits<char> > &))"
> (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z)
> referenced in function _wmain
> OctaveDenVC.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) class std::basic_ostream<char,struct
> std::char_traits<char> > & __cdecl operator<<(class
> std::basic_ostream<char,struct std::char_traits<char> > &,class Matrix const
> &)"
> (__imp_??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABVMatrix@@@Z)
> referenced in function _wmain
> OctaveDenVC.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: __thiscall Matrix::Matrix(int,int,double)"
> (__imp_??0Matrix@@QAE@HHN@Z) referenced in function _wmain
> OctaveDenVC.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: class std::basic_ostream<char,struct
> std::char_traits<char> > & __thiscall std::basic_ostream<char,struct
> std::char_traits<char> >::flush(void)"
> (__imp_?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ)
> referenced in function "class std::basic_ostream<char,struct
> std::char_traits<char> > & __cdecl std::endl(class
> std::basic_ostream<char,struct std::char_traits<char> > &)"
> (?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z)
> OctaveDenVC.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: class std::basic_ostream<char,struct
> std::char_traits<char> > & __thiscall std::basic_ostream<char,struct
> std::char_traits<char> >::put(char)"
> (__imp_?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z)
> referenced in function "class std::basic_ostream<char,struct
> std::char_traits<char> > & __cdecl std::endl(class
> std::basic_ostream<char,struct std::char_traits<char> > &)"
> (?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z)
> stdafx.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: __thiscall
> symbol_record::~symbol_record(void)" (__imp_??1symbol_record@@QAE@XZ)
> referenced in function "public: void * __thiscall symbol_record::`vector
> deleting destructor'(unsigned int)" (??_Esymbol_record@@QAEPAXI@Z)
> stdafx.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static void __cdecl octave_value::operator
> delete(void *,unsigned int)" (__imp_??3octave_value@@SAXPAXI@Z) referenced
> in function "public: void * __thiscall octave_value::`vector deleting
> destructor'(unsigned int)" (??_Eoctave_value@@QAEPAXI@Z)
> stdafx.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: __thiscall octave_value::~octave_value(void)"
> (__imp_??1octave_value@@QAE@XZ) referenced in function "public: void *
> __thiscall octave_value::`vector deleting destructor'(unsigned int)"
> (??_Eoctave_value@@QAEPAXI@Z)
> E:\OctaveDenVC\Debug\OctaveDenVC.exe : fatal error LNK1120: 9 unresolved
> externals
> Build log was saved at
> "file://e:\OctaveDenVC\OctaveDenVC\Debug\BuildLog.htm"
> OctaveDenVC - 10 error(s), 66 warning(s)
>
> --
> View this message in context: http://www.nabble.com/How-to-use-Octave-with-Visual-Studio-2008---tp17507964p19689250.html
> Sent from the Octave - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Help-octave mailing list
> Help-octave@...
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Re: How to use Octave with Visual Studio 2008 ?

by atabodur :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am using the version 3.0.1. Actually I setup this from the setup file "octave-3.0.1-vs2008-setup.exe". I am showing the octave files from the project properties->C/C++->Additional Include Directories and showing the include folder in the octave setup. I am also showing the lib files from the Project Properties->Linker->Additional Library Directories. I set up the PATH from the Control Panel->System->Environment Variables.

I don't know what is wrong with this. Any help will be appreciated. Thanks in advance.

M.S. Civ. Eng. Mehmet Ata BODUR

Re: How to use Octave with Visual Studio 2008 ?

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Did you add octave.lib to the Additional Dependencies?

Michael.


On Mon, Oct 6, 2008 at 9:42 AM, atabodur <atabodur@...> wrote:

>
> I am using the version 3.0.1. Actually I setup this from the setup file
> "octave-3.0.1-vs2008-setup.exe". I am showing the octave files from the
> project properties->C/C++->Additional Include Directories and showing the
> include folder in the octave setup. I am also showing the lib files from the
> Project Properties->Linker->Additional Library Directories. I set up the
> PATH from the Control Panel->System->Environment Variables.
>
> I don't know what is wrong with this. Any help will be appreciated. Thanks
> in advance.
>
> M.S. Civ. Eng. Mehmet Ata BODUR
>
> --
> View this message in context: http://www.nabble.com/How-to-use-Octave-with-Visual-Studio-2008---tp17507964p19833300.html
> Sent from the Octave - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Help-octave mailing list
> Help-octave@...
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Re: How to use Octave with Visual Studio 2008 ?

by atabodur :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes I did it as I explained in the previous mail. Octave.lib resides in ...\lib\octave-3.0.1 directory and I have shown this directory from the "Project Properties->Linker->Additional Library Directories". This should have worked but it doesn't. I don't know the reason. The thing is that it can not see the constructors and destructors at the linking stage complaining about some dlls. Did anybody succeeded in this? Or should it work? I don't know. May be you can try the code I have sent and see...

Thanks for your interest.

M. ATA
 


 
Michael Goffioul-2 wrote:
Did you add octave.lib to the Additional Dependencies?

Michael.


On Mon, Oct 6, 2008 at 9:42 AM, atabodur <atabodur@hotmail.com> wrote:
>
> I am using the version 3.0.1. Actually I setup this from the setup file
> "octave-3.0.1-vs2008-setup.exe". I am showing the octave files from the
> project properties->C/C++->Additional Include Directories and showing the
> include folder in the octave setup. I am also showing the lib files from the
> Project Properties->Linker->Additional Library Directories. I set up the
> PATH from the Control Panel->System->Environment Variables.
>
> I don't know what is wrong with this. Any help will be appreciated. Thanks
> in advance.
>
> M.S. Civ. Eng. Mehmet Ata BODUR
>
> --
> View this message in context: http://www.nabble.com/How-to-use-Octave-with-Visual-Studio-2008---tp17507964p19833300.html
> Sent from the Octave - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Help-octave mailing list
> Help-octave@cae.wisc.edu
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
_______________________________________________
Help-octave mailing list
Help-octave@cae.wisc.edu
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Re: How to use Octave with Visual Studio 2008 ?

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 14, 2008 at 12:13 PM, atabodur <atabodur@...> wrote:
>
> Yes I did it as I explained in the previous mail. Octave.lib resides in
> ...\lib\octave-3.0.1 directory and I have shown this directory from the
> "Project Properties->Linker->Additional Library Directories".

This is not what I asked. Putting the octave lib directory in
"Additional Library Directories" is not enough. You also have
to add "octave.lib" in the set of libraries that are linked in.

Michael.
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Re: How to use Octave with Visual Studio 2008 ?

by atabodur :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank You Michael for your time and interest. I have shown the lib files from "Project properties->Linker->Input->Additional Dependencies" the files octave.lib, octinterp.lib and cruft.lib files. Now it seems to work until showing the command window, but instantly closes the window with the error:

Debugger:: An unhandled non-continuable STATUS_DLL_NOT_FOUND exception was thrown during process load
The program '[5384] OctaveDenVC.exe: Native' has exited with code -1073741515 (0xc0000135).

I don't understand which dll it can not load. How can I understand it?

Anyway I am grateful for your answer. The solution seems one step ahead.

Best regards.

M. Ata
   


Michael Goffioul-2 wrote:
On Tue, Oct 14, 2008 at 12:13 PM, atabodur <atabodur@hotmail.com> wrote:
>
> Yes I did it as I explained in the previous mail. Octave.lib resides in
> ...\lib\octave-3.0.1 directory and I have shown this directory from the
> "Project Properties->Linker->Additional Library Directories".

This is not what I asked. Putting the octave lib directory in
"Additional Library Directories" is not enough. You also have
to add "octave.lib" in the set of libraries that are linked in.

Michael.
_______________________________________________
Help-octave mailing list
Help-octave@cae.wisc.edu
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Re: How to use Octave with Visual Studio 2008 ?

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Make sure octave's DLL are in your PATH when you run
your program. You can do that in the general project properties
in "Environment".

Michael.


On Thu, Oct 16, 2008 at 12:54 PM, atabodur <atabodur@...> wrote:

>
> Thank You Michael for your time and interest. I have shown the lib files from
> "Project properties->Linker->Input->Additional Dependencies" the files
> octave.lib, octinterp.lib and cruft.lib files. Now it seems to work until
> showing the command window, but instantly closes the window with the error:
>
> Debugger:: An unhandled non-continuable STATUS_DLL_NOT_FOUND exception was
> thrown during process load
> The program '[5384] OctaveDenVC.exe: Native' has exited with code
> -1073741515 (0xc0000135).
>
> I don't understand which dll it can not load. How can I understand it?
>
> Anyway I am grateful for your answer. The solution seems one step ahead.
>
> Best regards.
>
> M. Ata
>
>
>
>
> Michael Goffioul-2 wrote:
>>
>> On Tue, Oct 14, 2008 at 12:13 PM, atabodur <atabodur@...> wrote:
>>>
>>> Yes I did it as I explained in the previous mail. Octave.lib resides in
>>> ...\lib\octave-3.0.1 directory and I have shown this directory from the
>>> "Project Properties->Linker->Additional Library Directories".
>>
>> This is not what I asked. Putting the octave lib directory in
>> "Additional Library Directories" is not enough. You also have
>> to add "octave.lib" in the set of libraries that are linked in.
>>
>> Michael.
>> _______________________________________________
>> Help-octave mailing list
>> Help-octave@...
>> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>>
>>
>
> --
> View this message in context: http://www.nabble.com/How-to-use-Octave-with-Visual-Studio-2008---tp17507964p20011236.html
> Sent from the Octave - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Help-octave mailing list
> Help-octave@...
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave