HydrogenAudio

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: steel_space on 2003-06-26 11:40:05

Title: SDK problems
Post by: steel_space on 2003-06-26 11:40:05
Hi,
I have a problem compile some templates. Both PFC and SDK libs are compiled successfully, but if I use e.g. string8 (from pfc/string.h) I get following errors:

--------------------Configuration: foo_remote - Win32 Debug--------------------
Compiling...
StdAfx.cpp
c:\projects\foo_remote\pfc\string.h(14) : error C2143: syntax error : missing ';' before '<'
        c:\projects\foo_remote\pfc\string.h(269) : see reference to class template instantiation 'string_base<myChar>' being compiled
c:\projects\foo_remote\pfc\string.h(14) : error C2501: 'mem_block_t' : missing storage-class or type specifiers
        c:\projects\foo_remote\pfc\string.h(269) : see reference to class template instantiation 'string_base<myChar>' being compiled
c:\projects\foo_remote\pfc\string.h(14) : error C2059: syntax error : '<'
        c:\projects\foo_remote\pfc\string.h(269) : see reference to class template instantiation 'string_base<myChar>' being compiled
c:\projects\foo_remote\pfc\string.h(14) : error C2238: unexpected token(s) preceding ';'
        c:\projects\foo_remote\pfc\string.h(269) : see reference to class template instantiation 'string_base<myChar>' being compiled
c:\projects\foo_remote\pfc\string.h(24) : error C2653: 'mem_block' : is not a class or namespace name

etc.

How should I use string8 and similar classes in my project?
Title: SDK problems
Post by: esceo on 2003-06-29 03:10:30
it is probably the way you've setuped the sdk,
refer to here

http://www.hydrogenaudio.org/forums/index....hl=dependencies (http://www.hydrogenaudio.org/forums/index.php?act=ST&f=29&t=8915&hl=dependencies)
Title: SDK problems
Post by: kode54 on 2003-06-29 16:15:45
Ugh, and you shouldn't unpack the SDK inside of your project directory.


g:\x\foobar\PFC\
g:\x\foobar\Foobar2000\SDK
g:\x\foobar\Foobar2000\foo_yourcomponenthere

I keep a single workspace containing all of the projects in g:\x\foobar\Foobar2000, with plug-ins depending on the SDK project, SDK depending on utf8api, utf8api on PFC. Or like that order...

Then again, my arrangement only helps when switching between or batch building multiple plug-ins.
Title: SDK problems
Post by: steel_space on 2003-07-01 06:21:09
Quote
Ugh, and you shouldn't unpack the SDK inside of your project directory.


g:\x\foobar\PFC\
g:\x\foobar\Foobar2000\SDK
g:\x\foobar\Foobar2000\foo_yourcomponenthere

I keep a single workspace containing all of the projects in g:\x\foobar\Foobar2000, with plug-ins depending on the SDK project, SDK depending on utf8api, utf8api on PFC. Or like that order...

Then again, my arrangement only helps when switching between or batch building multiple plug-ins.

Still doesn't work. The problem is in file PFC/string.h. There is mem_block_t<myChar> data; declared, but mem_block_t is defined in mem_block.h which is not included.
Any suggestion?
Title: SDK problems
Post by: zanson on 2003-07-01 15:08:04
Quote
Quote
Ugh, and you shouldn't unpack the SDK inside of your project directory.


g:\x\foobar\PFC\
g:\x\foobar\Foobar2000\SDK
g:\x\foobar\Foobar2000\foo_yourcomponenthere

I keep a single workspace containing all of the projects in g:\x\foobar\Foobar2000, with plug-ins depending on the SDK project, SDK depending on utf8api, utf8api on PFC. Or like that order...

Then again, my arrangement only helps when switching between or batch building multiple plug-ins.

Still doesn't work. The problem is in file PFC/string.h. There is mem_block_t<myChar> data; declared, but mem_block_t is defined in mem_block.h which is not included.
Any suggestion?

Um, i've never used the Foobar SDK or anything, but if a needed .h file isn't #included, #include'ing it at the top of the file will usually fix that...
Title: SDK problems
Post by: kode54 on 2003-07-01 15:58:48
Are you including PFC/string.h directly? If you must include PFC directly in your project file, use PFC/pfc.h. The idea is to import SDK headers relevant to the services you're creating, such as reader.h or input.h.
Title: SDK problems
Post by: steel_space on 2003-07-02 07:31:27
Bingo, it works.
Thanks to all.
SimplePortal 1.0.0 RC1 © 2008-2021