Skip to main content
Topic: SDK problems (Read 2807 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

SDK problems

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?


SDK problems

Reply #2
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.

SDK problems

Reply #3
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?

SDK problems

Reply #4
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...

SDK problems

Reply #5
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.

SDK problems

Reply #6
Bingo, it works.
Thanks to all.

 
SimplePortal 1.0.0 RC1 © 2008-2019