Got some grief here


#1

been a while since I had this sort of shite.

while compiling my project in release. debug builds fine.

we’ve had this here before have we not?

can’t find anything anyway.

any ideas?


#2

what’s libcpmt? Should be using libcmt, shouldn’t it? Maybe try excluding that lib from the link.


#3

from what I can gather it’s a C++ counterpart to libcmt with STL/iostream stuff in it. so thier both linked in my case cos I’ve got iostream in there (OPC)

found this out here: http://support.microsoft.com/default.aspx?scid=kb;en-us;154753

if I ignore libcpmt.lib the obj with the iostream throws loads of unresolveds.

try sticking an iostream somewhere in a juce project and see what you get.

I think I’ll just rip out the iostream stuff for now as it’s not used here. but it’s my bosses code and he will not like the sound of problems using STL.

I’ve used this class with juce for months though! why this now?


#4

yep. I pulled out a few methods that were using std::istream and std:string

and it compiles

still need to get to the bottom of this though


#5

well maybe try not linking to libcmt, but using the other one instead?


#6

you mean put libcmt into ignore list so it just sees libcpmt?

i’ll try tommorow. home now.

there might be a mismatch somewhere as the iostream stuff is in a lib, and the errors occur when I compile an app using the lib.

I think the story is if you use “multi threaded” you get libcmt UNLESS you include stuff, then you’ll get libcpmt. I’m not sure but I think libcpmt just links to libcmt and adds stuff for streams?


#7

I’ve recreated the problem at home on vce.

create a static library from these…

testlib.h




class TestLib
{
	std::string s;
	float* f;

public:
	TestLib();
	~TestLib();
	void dostuff( std::iostream in );
};

testlib.cpp

[code]

TestLib::TestLib()
{
s += “arse”;
f = new float[ 10 ];
}

TestLib::~TestLib()
{
delete[] f;
}

void TestLib::dostuff( std::iostream in )
{

}[/code]

use h’s appwiz or whatever to create an app. include and link to testlib.

stick a

TestLib l;

somewhere ( i used initialise() )

do release build…

BOOM!

the libcpmt error!

have I thicko’d out somewhere?


#8

I’d say you need to include one of the standard library header on the Juce side (before including juce.h for example), so that VC will link this part too with LIBCPMT. And probably there’s no problem anymore with the few latest Juce version, as it’s got inside.
I’ve just tried linking your testlib with my project without problems, but then I’ve got standard headers everywhere…

Cedric


#9

nope. tried that.

put the testlib above into the app.

same error.


#10

this appears to be caused by lib version mismatches when MS fiddled with STL / iostream or something!?

anyway. switched to VS2005 with latest PSDK and it compiles (at work). I’m sure if I update my PSDK at home, all will be well there too. maybe.

fuck knows eh?


#11

I had the same problem with VS.NET2003 Pro.

I could solve the problem by specifying jucelib_static.lib (or jucelib_static_debug.lib) int the project settings in the linker inputs. Although juce
specifys it in the header.

Best regards,
Masa


#12

[quote=“hayashi”]I had the same problem with VS.NET2003 Pro.

I could solve the problem by specifying jucelib_static.lib (or jucelib_static_debug.lib) int the project settings in the linker inputs. Although juce
specifys it in the header.

Best regards,
Masa[/quote]

hmmm. never thought to try that. thanks. quite happy in VC2005 now though.

PS

:shock:

chief software designer, korg inc !!!

welcome!!

so is korg jucing these days or is it just your private projects?


#13

I found it a document about it in the Microsoft web site… (I forgot the address though, you can search by the linker erro code.)
Specifying the library name affects the linking order.

Although I made own cross platform library but it’s quite tough to maintain… So I’m now evaluating and trying to change to use JUCE. :slight_smile:
It’s very nice! We need some additional code like platform specific MenuBar, MDI frame/child window and so on. I already wrote them and now works fine but not ready to show the code. :oops:

Best regards,
Masanao Hayashi
Chief Software Engineer
Korg Inc.


#14

weird stuff! i’ve just started getting this error too! no iostream here tho, i’m using some windows headers to directly access the midi port commands (it’s for a uni assignment, we have to write the midi handling ourselves, but i’m doing the program interface with juce).

followed hayashi’s advice and it worked straight away.


#15

In my case also including windows.h caused that error…

Masa


#16

I just got that error by updating to the latest JUCE release on VCE 2005

I also needed to add a bunch of juce_UseDebuggingNewOperator macros to classes that hadn’t previously needed them in my app. :?

(that’ll teach me to update when everything is working fine)


#17