Search Results

Search found 1402 results on 57 pages for 'linking'.

Page 11/57 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Linking a template class using another template class (error LNK2001)

    - by Luís Guilherme
    I implemented the "Strategy" design pattern using an Abstract template class, and two subclasses. Goes like this: template <class T> class Neighbourhood { public: virtual void alter(std::vector<T>& array, int i1, int i2) = 0; }; and template <class T> class Swap : public Neighbourhood<T> { public: virtual void alter(std::vector<T>& array, int i1, int i2); }; There's another subclass, just like this one, and alter is implemented in the cpp file. Ok, fine! Now I declare another method, in another class (including neighbourhood header file, of course), like this: void lSearch(/*parameters*/, Neighbourhood<LotSolutionInformation> nhood); It compiles fine and cleanly. When starting to link, I get the following error: 1>SolverFV.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall lsc::Neighbourhood<class LotSolutionInformation>::alter(class std::vector<class LotSolutionInformation,class std::allocator<class LotSolutionInformation> > &,int,int)" (?alter@?$Neighbourhood@VLotSolutionInformation@@@lsc@@UAEXAAV?$vector@VLotSolutionInformation@@V?$allocator@VLotSolutionInformation@@@std@@@std@@HH@Z)

    Read the article

  • Linking CSS Navbar WIth Wordpress Pages

    - by JCHASE11
    I am using wordpress as a full on CMS on a site I am building. One thing I cant seem to figure out is how to link up my navigation bar to the pages I am creating in wordpress. I am using a sprite image hover navbar that is defined in the header.php file. Does anyone have any idea how I can take a typical CSS sprite navbar and link it up with the pages I am creating within wordpress?

    Read the article

  • linking against a static library

    - by ant2009
    Hello gcc Version: 4:4.4.4-1ubuntu2 GNU Make 3.81 I have the following library called net_api.a and some header files i.e. network_set.h I have include the header file in my source code in my main.c file #include <network_set.h> I have the following static library and header in the following directory ./tools/net/lib/net_api.a ./tools/net/inc/network_set.h In my Makefile I have tried to link using the following, code snippet: INC_PATH = -I tools/net/inc LIB_PATH = -L tools/net/lib LIBS = -lnet_api $(TARGET): $(OBJECT_FILES) $(CC) $(LDFLAGS) $(CFLAGS) $(INC_PATH) $(LIB_PATH) $(LIBS) $(OBJECT_FILES) -o $(TARGET) main.o: main.c $(CC) $(CFLAGS) $(INC_PATH) $(LIB_PATH) -c main.c However, when I compile I get the following errors: network_set.h error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘network_String’ Many thanks for any suggestions,

    Read the article

  • Linking two models in a multi-model form

    - by Elliot
    Hey Guys, I have a nested multimodel form right now, using Users and Profiles. Users has_one profile, and Profile belongs_to Users. When the form is submitted, a new user is created, and a new profile is created, but they are not linked (this is the first obvious issue). The user's model has a profile_id row, and the profile's model has a user_id row. Here is the code for the form: <%= form_for(@user, :url => teams_path) do |f| %> <p><%= f.label :email %><br /> <%= f.text_field :email %></p> <p><%= f.label :password %><br /> <%= f.password_field :password %></p> <p><%= f.label :password_confirmation %><br /> <%= f.password_field :password_confirmation %></p> <%= f.hidden_field :role_id, :value => @role.id %></p> <%= f.hidden_field :company_id, :value => current_user.company_id %></p> <%= fields_for @user.profile do |profile_fields| %> <div class="field"> <%= profile_fields.label :first_name %><br /> <%= profile_fields.text_field :first_name %> </div> <div class="field"> <%= profile_fields.label :last_name %><br /> <%= profile_fields.text_field :last_name %> </div> <% end %> <p><%= f.submit "Sign up" %></p> <% end %> A second issue, is even though the username, and password are successfully created through the form for the user model, the hidden fields (role_id & company_id - which are also links to other models) are not created (even though they are part of the model) - the values are successfully shown in the HTML for those fields however. Any help would be great!

    Read the article

  • Make file Linking issue Undefined symbols for architecture x86_64

    - by user1035839
    I am working on getting a few files to link together using my make file and c++ and am getting the following error when running make. g++ -bind_at_load `pkg-config --cflags opencv` -c -o compute_gist.o compute_gist.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o gist.o gist.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o standalone_image.o standalone_image.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o IplImageConverter.o IplImageConverter.cpp g++ -bind_at_load `pkg-config --cflags opencv` -c -o GistCalculator.o GistCalculator.cpp g++ -bind_at_load `pkg-config --cflags opencv` `pkg-config --libs opencv` compute_gist.o gist.o standalone_image.o IplImageConverter.o GistCalculator.o -o rungist Undefined symbols for architecture x86_64: "color_gist_scaletab(color_image_t*, int, int, int const*)", referenced from: _main in compute_gist.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make: *** [rungist] Error 1 My makefile is as follows (Note, I don't need opencv bindings yet, but will be coding in opencv later. CXX = g++ CXXFLAGS = -bind_at_load `pkg-config --cflags opencv` LFLAGS = `pkg-config --libs opencv` SRC = \ compute_gist.cpp \ gist.cpp \ standalone_image.cpp \ IplImageConverter.cpp \ GistCalculator.cpp OBJS = $(SRC:.cpp=.o) rungist: $(OBJS) $(CXX) $(CXXFLAGS) $(LFLAGS) $(OBJS) -o $@ all: rungist clean: rm -rf $(OBJS) rungist The method header is located in gist.h float *color_gist_scaletab(color_image_t *src, int nblocks, int n_scale, const int *n_orientations); And the method is defined in gist.cpp float *color_gist_scaletab(color_image_t *src, int w, int n_scale, const int *n_orientation) { And finally the compute_gist.cpp (main file) #include <stdio.h> #include <stdlib.h> #include <string.h> #include "gist.h" static color_image_t *load_ppm(const char *fname) { FILE *f=fopen(fname,"r"); if(!f) { perror("could not open infile"); exit(1); } int width,height,maxval; if(fscanf(f,"P6 %d %d %d",&width,&height,&maxval)!=3 || maxval!=255) { fprintf(stderr,"Error: input not a raw PPM with maxval 255\n"); exit(1); } fgetc(f); /* eat the newline */ color_image_t *im=color_image_new(width,height); int i; for(i=0;i<width*height;i++) { im->c1[i]=fgetc(f); im->c2[i]=fgetc(f); im->c3[i]=fgetc(f); } fclose(f); return im; } static void usage(void) { fprintf(stderr,"compute_gist options... [infilename]\n" "infile is a PPM raw file\n" "options:\n" "[-nblocks nb] use a grid of nb*nb cells (default 4)\n" "[-orientationsPerScale o_1,..,o_n] use n scales and compute o_i orientations for scale i\n" ); exit(1); } int main(int argc,char **args) { const char *infilename="/dev/stdin"; int nblocks=4; int n_scale=3; int orientations_per_scale[50]={8,8,4}; while(*++args) { const char *a=*args; if(!strcmp(a,"-h")) usage(); else if(!strcmp(a,"-nblocks")) { if(!sscanf(*++args,"%d",&nblocks)) { fprintf(stderr,"could not parse %s argument",a); usage(); } } else if(!strcmp(a,"-orientationsPerScale")) { char *c; n_scale=0; for(c=strtok(*++args,",");c;c=strtok(NULL,",")) { if(!sscanf(c,"%d",&orientations_per_scale[n_scale++])) { fprintf(stderr,"could not parse %s argument",a); usage(); } } } else { infilename=a; } } color_image_t *im=load_ppm(infilename); //Here's the method call -> :( float *desc=color_gist_scaletab(im,nblocks,n_scale,orientations_per_scale); int i; int descsize=0; //compute descriptor size for(i=0;i<n_scale;i++) descsize+=nblocks*nblocks*orientations_per_scale[i]; descsize*=3; // color //print descriptor for(i=0;i<descsize;i++) printf("%.4f ",desc[i]); printf("\n"); free(desc); color_image_delete(im); return 0; } Any help would be greatly appreciated. I hope this is enough info. Let me know if I need to add more.

    Read the article

  • QList as a function parameter - Linking Error - LNK2019

    - by user2445136
    I have an issue with QList as a function parameter and I'll be glad if you can assist me. I have this code for example: void SpinBoxList_Enable(QList spinBoxList) { foreach(QWidget mWidget,*spinBoxList) mWidget-setEnabled(false); } and in the implemantation file I use the QList variable as a pointer: SpinBoxList_Enable(&controlBoardSpinBoxList); ( controlBoardSpinBoxList is a variable of QList ). The Function ToggleBoards_Slot(bool) is a slot that uses When I compile, I get this error message: 1cmosaixserialnumber.obj : error LNK2019: unresolved external symbol "private: void __cdecl CMosaixSerialNumber::SpinBoxList_Disable(class QList *)" (?SpinBoxList_Disable@CMosaixSerialNumber@@AEAAXPEAV?$QList@PEAVQWidget@@@@@Z) referenced in function "public: void __cdecl CMosaixSerialNumber::ToggleBoards_Slot(bool)" (?ToggleBoards_Slot@CMosaixSerialNumber@@QEAAX_N@Z) 1cmosaixserialnumber.obj : error LNK2019: unresolved external symbol "private: void __cdecl CMosaixSerialNumber::SpinBoxList_Enable(class QList *)" (?SpinBoxList_Enable@CMosaixSerialNumber@@AEAAXPEAV?$QList@PEAVQWidget@@@@@Z) referenced in function "private: void __cdecl CMosaixSerialNumber::on_ControlBoardCheckBox_StateChanged(int)" (?on_ControlBoardCheckBox_StateChanged@CMosaixSerialNumber@@AEAAXH@Z) How can I fix this ? Thanks, EVH671

    Read the article

  • Multiple foreign keys from one table linking to single primary key in second table

    - by croker10
    Hi all, I have a database with three tables, a household table, an adults table and a users table. The Household table contains two foreign keys, iAdult1ID and iAdult2ID. The Users table has a iUserID primary key and the Adult table has a corresponding iUserID foreign key. One of the columns in the Users table is strUsername, an e-mail address. I am trying to write a query that will allow me to search for an e-mail address for either adult that has a relation to the household. So I have two questions, assuming that all the values are not null, how can I do this? And two, in reality, iAdult2ID can be null, is it still possible to write a query to do this? Thanks for your help. Let me know if you need any more information.

    Read the article

  • Ms Excel Problem Linking Range in Source Document to Custom Function in Target Document

    - by user261935
    I have some customer MS Excel VBA code (MS Excel 2007) that takes a range as input and then does some work on it (it is quite a large range). I want to use a separate excel document as the source of the range data. If I have both the source and target document open then the function works just fine. If I have only the target document open I get #Value! returned and stepping through in the debugger I see "Error 2023" in the data value passed in. Any ideas how I make this work without having to open both spreadsheets simultaneously?

    Read the article

  • Linking directly to the Write Review page from iPhone

    - by bparanj
    I have been trying to redirect the user to the review page. I tried 3 different URL formats: {http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=350212768&mt=8} (goes to the product page on safari) {http://itunes.apple.com/us/app/british-accent/id350212768?mt=8#} (Goes to the product page in iTunes store on the device) {http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=350212768&pageNumber=0& sortOrdering=1&type=Purple+Software&mt=8} (results in too many redirects) Could you please tell me what the URL format should be to link directly to the review page? Thanks.

    Read the article

  • What am I doing wrong?, linking in C++

    - by Facon
    I'm trying to code a simple base64 encoder/decoder (to test my programming skill). I can compile it, but it doesn't link, I've this message error: C:\Documents and Settings\Facon\Escritoriog++ base64.o main.o -o prueba.exe main.o:main.cpp:(.text+0x24a): undefined reference to `Base64Encode(std::vector const&)' collect2: ld returned 1 exit status Compiler & Linker: Mingw32 3.4.5 SO: Windows XP This is my source code: base64.h: #ifndef BASE64_H #define BASE64_H #include <iostream> #include <vector> typedef unsigned char byte; std::string Base64Encode(const std::vector<byte> &array); std::vector<byte> Base64Decode(const std::string &array); #endif base64.cpp: #include "base64.h" std::string Base64Encode(std::vector<byte> &array) { const char *base64_table = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; const unsigned int size = array.size(); std::string output; for (unsigned int i = 0; (i < size); i++) { if ((size - i) > 3) { output.push_back(static_cast<char>(base64_table[array[i] >> 2])); output.push_back(static_cast<char>(base64_table[((array[i++] & 0x03) << 4) | ((array[i] & 0xF0) >> 4)])); output.push_back(static_cast<char>(base64_table[((array[i++] & 0x0F) << 2) | ((array[i] & 0xC0) >> 4)])); output.push_back(static_cast<char>(base64_table[array[i] & 0x3F])); } else if ((size - i) == 3) { output.push_back(static_cast<char>(base64_table[array[i] >> 2])); output.push_back(static_cast<char>(base64_table[((array[i++] & 0x03) << 4) | ((array[i] & 0xF0) >> 4)])); output.push_back(static_cast<char>(base64_table[(array[i] & 0x0F) << 2])); output.push_back(static_cast<char>('=')); } else if ((size - i) == 2) { output.push_back(static_cast<char>(base64_table[array[i] >> 2])); output.push_back(static_cast<char>(base64_table[(array[i] & 0x03) << 4])); output.push_back('='); output.push_back('='); } } return output; } std::vector<byte> Base64Decode(const std::string &array) // TODO { const char *base64_table = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; } main.cpp: #include <iostream> #include <vector> #include "base64.h" using namespace std; int main(int argc, char *argv[]) { const char* prueba = "sure."; vector<byte> texto; string codificado; for (unsigned int i = 0; (prueba[i] != 0); i++) { texto.push_back(prueba[i]); } codificado = Base64Encode(texto); cout << codificado; return 0; } PD: Sorry for my bad knowledge of English :P

    Read the article

  • Multiple Foriegn Keys from One Table linking to single Primary Key in second Table

    - by croker10
    Hi all, I have a database with three tables, a household table, an adults table and a users table. The Household table contains two foreign keys, iAdult1ID and iAdult2ID. The Users table has a iUserID primary key and the Adult table has a corresponding iUserID foreign key. One of the columns in the Users table is strUsername, an e-mail address. I am trying to write a query that will allow me to search for an e-mail address for either adult that has a relation to the household. So I have two questions, assuming that all the values are not null, how can I do this? And two, in reality, iAdult2ID can be null, is it still possible to write a query to do this? Thanks for your help. Let me know if you need any more information.

    Read the article

  • dependencies linking isnt enough?

    - by Russel
    In Visual Studio (C++) the other day, I was trying to build some example code and it would not work, even though I was pointing at the right include and lib directories. (I got linker errors) I asked a friend who fixed the problem by specifying the necessary .lib files in the General Properties-Linker-Input field of the project settings. My questions: Simply pointing to the directory with the .lib files is not enough? You need to specifically tell the linker which lib files to link? By listing the .lib files in the "additional dependencies" field, am I specifying exactly which static libs get built into the exe? If the answer to this is yes, then will these be the ONLY lib files that get built into the exe? Why is it called "additional" dependencies? Is there another place to specify lib files to include? Before I thought this was done by including the necessary header file? Thanks everyone! Russel

    Read the article

  • Linking Apache to Tomcat with multiple domains.

    - by Royce Thigpen
    Okay, so I've been working for a while on this, and have been searching, but so far I have not found any answers that actually answer what I want to know. I'm a little bit at the end of my rope with this one, but I'm hoping I can figure this out sometime soon. So I have Apache 2 installed and serving up standard webpages, but I also have that linked to a Tomcat instance for one of my domains currently supported. However, I want to add another domain to the server via Apache that points to a separate code base from the one I already have. I have been coming at this from several different angles, and I have determined that I just don't know enough about setting up these servers to really do what I want to do. Little information on my server: Currently running a single Tomcat5.5 instance with Apache 2, using mod_jk to connect them together. I have a worker in workers.properties that points it's "host" field to "localhost" with the correct port my Tomcat instance, so that all works. In my Tomcat server.xml file, I have a host defined as "localhost" that points at my webapp that I am currently serving up, with that host set as the defaultHost as well. One thought I had was that I could add a new worker with a different host than "localhost" (i.e. host2) and then define a new host in my server.xml file called "host2" to match it, but after reading around some on the internet, It seems the "host" of the worker must point to a server, and not a hostname in the Tomcat instance, is this correct? Again, a simple rundown of what I want: Setup in apache/tomcat combo such that www.domain1.com points at "webapp1" and www.domain2.com points at "webapp2".

    Read the article

  • VS 2008 linking error

    - by AvatarBlue
    I'm using Visual Studio 2008 C++ and working on a dll project. Debug compiled and linked perfectly but when I compile the release version, it shows this: VImgPtr.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4 VLibraryPtr.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) D:\Source Code\VImgLib\Release-vc9u\VImgLib-vc9u.dll : fatal error LNK1120: 2 unresolved externals If I selected Multi-threaded (/MT) in "C/C++-Code Generation tab), it linked ok. The problem is only when I choose Multi-threaded DLL (/MD). I'm releasing a dll, so should be /MD right?

    Read the article

  • Compile a binary file for linking OSX

    - by Satpal
    I'm trying to compile a binary file into a MACH_O object file so that it can be linked it into a dylib. The dylib is written in c/c++. On linux the following command is used: ld -r -b binary -o foo.o foo.bin I have tried various option on OSX but to no avail: ld -r foo.bin -o foo.o gives: ld: warning: -arch not specified ld: warning: ignoring file foo.bin, file was built for unsupported file format which is not the architecture being linked (x86_64) An empty .o file is created ld -arch x86_64 -r foo.bin -o foo.o ld: warning: ignoring file foo.bin, file was built for unsupported file format which is not the architecture being linked (x86_64) Again and empty .o file is created. Checking the files with nm gives: nm foo.o nm: no name list The binary file is actually, firmware that will be downloaded to an external device. Thanks for looking

    Read the article

  • Creating a view linking three different node types with two node references

    - by mikesir87
    I have the following content types: Camp - the top level type Registration Information - contains node reference to Camp called Camp Medical Release Form - contains node reference to registration information called Camper I would like to create a View that takes the nid for the Camp, and pulls out all the fields for the Registration Info and Medical Release Form. I'm having trouble figuring out how to set up the various arguments/relationships. I haven't done something that's referenced more than two types. I know it would be smart/best to just combine the Registration Info and Medical Release Form, since it's a 1:1 mapping, but we can't. So... any help would be appreciated!

    Read the article

  • Linking Post Title to Specific Page ID

    - by ThatMacLad
    I've created a form to update my websites homepage with content but I wanted to know how I could set it up so that a posts title links to a specific post ID. I'd also like to add a Read More link that directs anybody reading the blog to the correct post. Here is my PHP code: <html> <head> <title>Blog Name</title> </head> <body> <?php mysql_connect ('localhost', 'root', 'root') ; mysql_select_db ('tmlblog'); $sql = "SELECT * FROM php_blog ORDER BY timestamp DESC LIMIT 5"; $result = mysql_query($sql) or print ("Can't select entries from table php_blog.<br />" . $sql . "<br />" . mysql_error()); while($row = mysql_fetch_array($result)) { $date = date("l F d Y", $row['timestamp']); $title = stripslashes($row['title']); $entry = stripslashes($row['entry']); $password = $row['password']; $id = $row['id']; if ($password == 1) { echo "<p><strong>" . $title . "</strong></p>"; printf("<p>This is a password protected entry. If you have a password, log in below.</p>"); printf("<form method=\"post\" action=\"post.php?id=%s\"><p><strong><label for=\"username\">Username:</label></strong><br /><input type=\"text\" name=\"username\" id=\"username\" /></p><p><strong><label for=\"pass\">Password:</label></strong><br /><input type=\"password\" name=\"pass\" id=\"pass\" /></p><p><input type=\"submit\" name=\"submit\" id=\"submit\" value=\"submit\" /></p></form>",$id); print "<hr />"; } else { ?> <p><strong><?php echo $title; ?></strong><br /><br /> <?php echo $entry; ?><br /><br /> Posted on <?php echo $date; ?> <hr /></p> <?php } } ?> </body> </html> Thanks for any help. I really appreciate any input!

    Read the article

  • MVC Serve audio files while preventing direct linking using HttpResponseBase

    - by VinceGeek
    I need to be able to serve audio files to an mvc app while preventing direct access. Ideally the page would render with a player control so the user can start/stop the audio linked to the database record (audio files are in a folder not the db). I have a controller action like this: Response.Clear(); Response.ContentType = "audio/wav"; Response.TransmitFile(audioFilename); Response.End(); return Response; and the view uses the RenderAction method <% Html.RenderAction("ServeAudioFile"); %> this works but it won't display inline on the existing view, it opens a new page with just the media control. Am I totally barking up the wrong tree or is there a way to embed the response in the existing view? works exactly as I would like but I can't control access to the file.

    Read the article

  • Linking/Combining Type Classes in Haskell

    - by thegravian
    Say I have two type classes defined as follows that are identical in function but different in names: class Monad m where (>>=) :: m a -> (a -> m b) -> m b return :: a -> m a class PhantomMonad p where pbind :: p a -> (a -> p b) -> p b preturn :: a -> p b Is there a way to tie these two classes together so something that is an instance of PhantomMonad will automatically be an instance of Monad, or will instances for each class have to be explicitly written? Any insight would be most appreciated, thanks!

    Read the article

  • C# (ASP.Net) Linking selection values to constants in Codebehind

    - by jasonvogel
    ASPX Code <asp:RadioButtonList ID="rbServer" runat="server" > <asp:ListItem Value=<%=ServerDeveloper%>> Developer </asp:ListItemv <asp:ListItem Value="dev.ahsvendor.com"> dev.test.com</asp:ListItem> <asp:ListItem Value="staging.ahsvendor.com"> staging.test.com</asp:ListItem> </asp:RadioButtonList> ASPX.CS - Codebehind const string ServerDeveloper = "developer"; ASPX Error: Code blocks are not supported in this context. Question: So what is the correct way to tie an dropdown/radio buttion/... ASPX value to a constant that is shared with the CodeBehind code? I know that I could do rbServer.Add.Item("developer") [from the CodeBehind], but is there a way to achieve it from the Presentation side of things?

    Read the article

  • Linking Error: undefined reference to `MPI_Init' on Windows 7

    - by fatpipp
    I am using OpenMPI library to write a program to run on Windows 7. I compile and build with C Free 4.0, Mingw. Compiling is Ok but when the compiler links object, errors "undefined reference to ..." occurs. I have set the environment already: I added OpenMPI lib, include and bin folder into C Free Build Directories. I added them into Windows environment variables too. But the error still occurs. Can anyone tell me how to fix it? Thanks a lot.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >